Garrett D'Amore wrote:
> It strikes me that this problem underscores that we need a better way to
> monitor real memory usage -- perhaps looking at memory allocated via
> brk() vs memory backed by mmap() of files (whether ordinary as in the
> jar or special as in framebuffers.)

RSS is purely a single-process concept; with shared libs it isn't very 
useful, since the degree of sharing determines the real % of memory used 
by each process sharing the underlying object.

pmap(1) is a much more useful tool if you want to see how much memory is 
being used by a process since it breaks down usage by memory type. But it 
doesn't directly answer the question "how much memory is being used by 
Java on my system" when you have several Java VMs running; you have to 
figure that out by adding up the anon+heap+stack of each process and 
adding the shared library usage. Blech.

We (the VM team) are looking into different possible solutions for memory 
usage observability for groups of processes such as all of the processes 
running in a zone, so you can tell how much physical memory is being used 
by that grouping of processes taking sharing into account. But that isn't 
perfect either -- any such tool would return a value == RSS for a single 
process, since you're essentially asking what a process' physical memory 
usage would be if it were running in isolation.

- Eric

Reply via email to