Andrei Dorofeev wrote:

So, unfortunately, the current situation with memory accounting
is not perfect *and* there's very little room for improvements.

The good news is that  Memory Sets and Swap Sets projects
will solve two other problems you've identified :-)


The problem is essentially this - since many process can
share arbitrary pieces of memory - say by mapping a large
file MAP_PRIVATE and then writing to every other page -
the only accurate way of determining true sharing by
process is to walk all the pages in each process and figure
out which ones are sharing which pages... not very practical.
Given than some Solaris users have machines with .5 TB of RAM
and 20k processes, we need algorithms that are O(#processes)
rather than O(#processes * memory usage per process).

Overall, we can figure out pretty easily where pages are being
used, but attributing them to various processes is a lot of
work. Echo '::memstat' | mdb -k can be very informative:

# echo "::memstat" | mdb -k
Page Summary                Pages                MB  %Tot
------------     ----------------  ----------------  ----
Kernel                     140283               547   27%
Anon                        95853               374   18%
Exec and libs               12203                47    2%
Page cache                 161390               630   31%
Free (cachelist)           103333               403   20%
Free (freelist)              9064                35    2%

Total                      522126              2039
Physical                   522124              2039

- Bart

--
Bart Smaalders                  Solaris Kernel Performance
[EMAIL PROTECTED]               http://blogs.sun.com/barts
_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org

Reply via email to