Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

swap -l v's swap -s

Status
Not open for further replies.

Sambo8

Programmer
May 10, 2005
78
NZ
Hi All,

I'm doing an oracle install and solaris and trying do define if there is enough available swap however swap -l tells me that there is 14g available out of 15g where swap -s seems to say that there is less than 3g available by doing a divide by 2 for blocks is that correct? what is the more accurate reading?

Many thanks,
Sam
 
Unfortunately the swap terminology in Solaris is ambiguous. The output of the first command is showing you the amount of swap when it is used to refer to the amount of "virtual memory" free in the system, so that includes both physical memory and swap space on disk. The output of the second command is just showing you the sizes of the swap areas on disk.

Once upon a time the recommendation was that the swap areas on disk should be 2 x physical RAM, however that is no longer true with modern systems and OS. I would very rarely configure more than 2GB of swap.

Annihilannic.
 
I agree that the "2x of physical RAM" for swap is obsolete. The "2x" rule of thumb was created when a machine having 256 Megabytes of RAM was considered big. If you have a machine with 2 or 4 GB or more of RAM, creating a swap of 2x that will usually degrade performance. Solaris seems to keep more things swapped than it really needs to.

I have one machine with 12GB and there's no way I would ever need a 24GB swap space. Actually, the question becomes; Do I even need swap space on this machine?

The best reason for a big swap is if you need a very large /tmp space. That's because /tmp is usually shared with swap. So some apps and large sorts and other things may need a larger swap just to have more /tmp space.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top