Here is what I mean. I'm running squid on my machine. Squid is starting 18 threads which are counted as as many processes by gmemusage so that the reported memory used by squid is 179496KB. This is more physical memory than I have on my machine! Then of course everything else appears to be using a small percentage of memory. If we could detect that two pids are in fact just two threads of the same process we could avoid counting the memory they use twice. One way to do this would be to compare '/proc/*/map'. Hopefully another technique can be used. AFAIK the kernel has this information and uses it to avoid having to change the virtual->physical mappings when doing a context switch between two threads. This is a degenerated case of the more general misaccounting of 'shared memory' problem mentioned in the TODO file. But as 'shown' above it can be solved independently of this more general problem.
severity 55977 wishlist thanks unfortunately AFAICT there is no easy or fast way to fix this under linux ATM. Adrian Adrian Bridgett <bridgett@hursley.ibm.com> Internal: 7-245528 External: 01962-815528 MQSeries Glue Team, DE2R05, Hursley Park, UK, SO21 2JN (Mailpoint 211)
severity 55977 wishlist thanks unfortunately AFAICT there is no easy or fast way to fix this under linux ATM. Adrian Adrian Bridgett <bridgett@hursley.ibm.com> Internal: 7-245528 External: 01962-815528 MQSeries Glue Team, DE2R05, Hursley Park, UK, SO21 2JN (Mailpoint 211)