Ok, after a long investigation, here are the conclusions: there is no memory leak and VSZ really is virtual :).

Let me explain, for every thread, pthread "adds" 32mB to the vm.
I did this test, I reduced to 1 the number of connection threads (instead of the 50 orignal ones) and bingo the VSZ reduced to a value around 100mB, instead of the initial 700mB.
I then re-enabled the 50 connection threads, recompiled newpki_server, and ran 'cat /proc/meminfo' before running newpki_server, here is the output:
total: used: free:
Mem: 517894144 482705408 35188736
Swap: 534601728 26198016 508403712


I then ran newpki_server (with 8 entities in it), waited a bit and re-ran 'cat /proc/meminfo', here is the output
total: used: free:
Mem: 517894144 486785024 31109120
Swap: 534601728 26198016 508403712


As you can see the swap didn't move, however 'cat /proc/`pidof newpki_server`/status' tells me:
VmSize: 766168 kB


As you can see, the info of VSZ is not to be taken for granted :)

If you really want to do the test, install and run newpki_server on a Win2000 server, configure it to have as many entities as in you linux box, once the server is up and running run the "task manager", and look at the memory usage of newpki_server.exe (in Windows the memory usage is for the ram and the swap, there is no "bullshit" about its meaning), you will see, it should be around 10mB.

Regards,
--
Fr�d�ric Giudicelli
http://www.newpki.org

_____________________________________________________________________
NewPKI                                          http://www.newpki.org
User Support Mailing List                     [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to