From: Hancock, David (DHANCOCK) <DHANCOCK@ar...> - 2003-04-09 21:26:03
Just to close the loop ...
I appreciated all the assistance with understanding this, and I'll summarize
here and give a quick status.
1. Several people pointed out that even though it looks like each thread is
consuming memory, it's shared among all the threads, so it should only get
2. There are definite differences in how ps, top, and cat
/proc/<nnnnn>/status report memory usage. The top utility doesn't seem to
take the DATA size into account. The ps utility includes it, and it's
broken out separately in /proc/<nnnnn>/status. Here are examples:
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
18608 adc 20 5 27312 26M 4336 S N 0.0 1.3 0:12 python
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
adc 18608 0.0 1.3 293664 27312 ? SN Apr08 0:12 python
VmSize: 293664 kB
VmLck: 0 kB
VmRSS: 27316 kB
VmData: 284060 kB
VmStk: 72 kB
VmExe: 596 kB
VmLib: 8436 kB
Two out of three say that the process really is 293MB, and almost all of it
is in VmData (stack is small, exe is small, library is small, resident-set
size isn't bad. That seems like a lot of data, even for 30 threads, but
(see #3 below) maybe I just wasn't noticing this before.
3. There may be differences between how RedHat 7.3 and RedHat 6.2 utilities
report memory usage. I'm trying to track this down experimentally.
I'm still worried about a data size of 280MB, and if anyone knows ways to
figure out what's taking so much space, I'd like to learn how.
Thanks again for all the assistance.
David Hancock | dhancock@... | 410-266-4384
On Wed, Apr 09, 2003 at 05:25:58PM -0400, Hancock, David (DHANCOCK) wrote:
> 3. There may be differences between how RedHat 7.3 and RedHat 6.2 utilities
> report memory usage. I'm trying to track this down experimentally.
I've always found differences in how 'free' and 'top' calculate
free, buffer and cache memory. Which is more correct (for some
definition of "correct"), I don't know. Take whichever one looks
-Mike (Iron) Orr, mso@... (iron@...)
English * Esperanto * Russkiy * Deutsch * Espan~ol