Re: huge memory allocation on simultaneous ssl handshakes.

2007-10-30 Thread Kyle Hamilton
[...] On 10/30/07, Scott Gifford <[EMAIL PROTECTED]> wrote: > If this presents a real problem, the general solution is to use a > specialized malloc, which uses a memory allocation method that allows > returning memory to the OS, such as mmap. I'm not sure how to use a > custom malloc with OpenSSL

Re: huge memory allocation on simultaneous ssl handshakes.

2007-10-30 Thread Scott Gifford
Lutz Jaenicke <[EMAIL PROTECTED]> writes: [...] > Yes, only 100MB might be actually used but the 2GB would still be > reserved in memory. > To get an idea about this behavior you can write a simple program like And just to elaborate a little, if other processes need this memory, the OS will swap

Re: huge memory allocation on simultaneous ssl handshakes.

2007-10-30 Thread Lutz Jaenicke
Steffen DETTMER wrote: > * Ramashish Baranwal wrote on Tue, Oct 30, 2007 at 15:06 +0530: > >>> The heap size will never be reduced again regardless of the >>> amount of "free()" calls, the memory can however be reused. >>> Therefore, if your application at one point in time needs a >>> lot of he

RE: huge memory allocation on simultaneous ssl handshakes.

2007-10-30 Thread Kukosa, Tomas
> Is openssl using some kind of memory > caching for its ssl handshake which is not getting released when the > handshake is over? Each established SSL/TLS connection allocates at least 58983 bytes. All those 3 buffers (18437 B, 18698 B, 21848 B) are allocated when the new connection is accepted w

Re: huge memory allocation on simultaneous ssl handshakes.

2007-10-30 Thread Steffen DETTMER
* Ramashish Baranwal wrote on Tue, Oct 30, 2007 at 15:06 +0530: > > The heap size will never be reduced again regardless of the > > amount of "free()" calls, the memory can however be reused. > > Therefore, if your application at one point in time needs a > > lot of heap space the memory consumptio

Re: huge memory allocation on simultaneous ssl handshakes.

2007-10-30 Thread Ramashish Baranwal
On 10/30/07, Lutz Jaenicke <[EMAIL PROTECTED]> wrote: > Ramashish Baranwal wrote: > > Hi, > > > > I have a server which accepts ssl connections. I have a client which > > does parallel ssl > > connections to this. After closing all connections the server has > > unfreed memory. This gets reused for

Re: huge memory allocation on simultaneous ssl handshakes.

2007-10-30 Thread Lutz Jaenicke
Ramashish Baranwal wrote: > Hi, > > I have a server which accepts ssl connections. I have a client which > does parallel ssl > connections to this. After closing all connections the server has > unfreed memory. This gets reused for subsequent ssl connections, so no > issue there. > > My problem is

huge memory allocation on simultaneous ssl handshakes.

2007-10-29 Thread Ramashish Baranwal
Hi, I have a server which accepts ssl connections. I have a client which does parallel ssl connections to this. After closing all connections the server has unfreed memory. This gets reused for subsequent ssl connections, so no issue there. My problem is with the amount of memory left over. I do