Question about 'top' values on memory usage
Artem Kuchin
matrix at itlegion.ru
Sun Oct 14 06:31:19 PDT 2007
Hello!
Maybe someone with deeper knowledge of the internals of FreeBSD
can clean up something for me (any for many others)^
Here are lines from my top:
PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
9258 hordelo_ru 1 4 0 40992K 4260K accept 0 0:00 0.00% httpd
9257 hordelo_ru 1 44 0 40992K 4296K select 1 0:00 0.00% httpd
9259 hordelo_ru 1 4 0 40992K 4292K select 1 0:00 0.00% httpd
As you see, 'size' is the same for all processes, while RES varies.
As i understand, the real memory taken by a process is RES and SIZE include
a bunch of shares .so libs, so, if more httpd's started each will take
only about 4300K more, so, 100 https will take 430000K to run, right?
Another question is that is httpd uses threads (as provided by FreeBSD)
starting a new thread will or will not copy executable copy and data? Basically,
will a new thread eat another 4300K or just a little bit for its data?
All this i need to calculate maximum possible number of https i can run on a box
with certain amount of memory and select proper MPM for Apache.
Somehow, i could not find any practical info on this regarding FreeBSD.
Thank you in advance!
--
Regards,
Artem Kuchin
More information about the freebsd-stable
mailing list