How should I monitor memory usage/performance in SunOS/Solaris?
listed in answer
ANSWER:
first question: Is it possible to get detailed memory information on SunOS with the default system tools (i.e. not using top)?
It is definitely possible to get detailed memory statistics and more with Solaris standard tools (SunOS is only the kernel name nowadays). In addition to the already mentioned echo ::memstat | mdb -k, you can have memory statistics per process and per user with prstat -a and per zone with prstat -Z.
The kernel is also providing numerous statistics through the kstat interface (munin is using them).
For example, if you want to display the total RAM, the part of it used by the kernel, by the ZFS cache (part of kernel used memory), and the free memory, you can run this command:
kstat -T d -p :::physmem :::pp_kernel zfs:::size :::pagesfree 1 3
If you are looking to virtual memory usage, use the swap -s command.
Second question: Do the paging graphs indicate that parts of the memory are paged to disk? Or is the activity caused by file operations in /tmp?
None of the above. Having such activity doesn’t necessarily means a lack of RAM and page thrashing. On the opposite, your graph shows the sr value staying at 0. That means the page scanner has no activity and thus that you have enough RAM installed. The paging activity is simply due to memory mapped files being read and written. Nothing to worry about. The files being on /tmp are only present in RAM (in your case), so no paging occur when accessing them.
Beware that Solaris uses the swap term to either name the part of disk used to store memory pages that are paged out from RAM or to name the whole virtual memory space, i.e. the swap area plus the part of RAM that is not locked there.

New Comments