Jun 17, 2005

Swap space on Solaris

My colleagues argues how to check swap space on Solaris for Oracle database server. They use different coommands and get the different results.
Here is what I found from http://www.princeton.edu/~psg/unix/solaris/troubleshoot/ram.html

The Solaris virtual memory system combines physical memory with available swap space via swapfs. If insufficient total virtual memory space is provided, new processes will be unable to open.

Swap space can be added, deleted or examined with the swap command.
swap -l
reports total and free space for each of the swap partitions or files that are available to the system. Note that this number does not reflect total available virtual memory space, since physical memory is not reflected in the output.

swap -s
reports the total available amount of virtual memory, as does sar -r.

If swap is mounted on /tmp via tmpfs, df -k /tmp will report on total available virtual memory space, both swap and physical.