Quote:
Originally Posted by
javanoob
Swap allocated will not be shown swap -l. swap used will be shown in swap -l.
Yes. The issue is the word "swap" has several meanings. When you say "swap allocated", you talk about virtual memory but when you say "swap used", that might still be virtual memory (swap -s) or on disk swap (swap -l).
Quote:
"pages swapped out" and "pages swapped in" eventually ends as -> Current swap_used
Not that much. Generally, most of the paging activity won't be related to the on-disk swap area but just regular files read/write operations. Therefore, hi page-in/page-out counters do not imply there is a shortage in RAM, just some active disk I/Os. As I wrote, the relevant statistic about RAM shortage is the scan rate (sr).
Quote:
Is there anyway to look into the physical swap area and see what's there and hold by which process ?
Not an easy task, and depending on the method used, reading what is there would have the side effect to page it in, i.e. to put it back into RAM.
You can have detailed information about a process memory usage with the
pmap -xs command.
The blocks related to swap are tagged "[anon]" for anonymous. That means the pages have no file back-end. The RSS column tells the number of pages that are currently in RAM while the KBytes column gives the size of the block.
Knowing these addresses, you can use the kernel modular debugger (
mdb -k)to retrieve the mapping between virtual addresses returned by pmap and the corresponding physical addresses.
Quote:
On a side note, after going through the entire thread, can i say it is absolutely possible for a system to have plenty of free physical ram and even disk swap, but very limited virtual memory due to virtual memory reservation and due to the fact that Solaris doesn't over commit virtual-memory ?
Yes, and I have already observed such puzzling at first sight situations in real life systems.