Why different Swap Space amounts with Swap -l and Swap -s for ZFS?

Hi Experts, if I run swap -s command I see 26 GB. If I run swap - command I see 41 GB.
The swap -l command also shows the zpools. What is the differenceand which command
is showing the actual swap space? Thanks!
Rhiaanon44Asked:
Who is Participating?
 
Brian UtterbackConnect With a Mentor Principle Software EngineerCommented:
The swap -l command lists the swap per device, while the swap -s gives the total of all devices. however, the swap -l command does not include the part of swap that is contributed by the physical memory, while swap -s does.
0
 
arnoldCommented:
http://manpages.unixforum.co.uk/man-pages/unix/solaris-10-11_06/1M/swap-man-page.html

Actual space in your terms is the swap specifically allocated for running the OS only and not the additional pools added for use in other contexts?
-s seems to be the summary of allocated swap space.
0
 
Rhiaanon44Author Commented:
Should the available swap amount of 25GB survive a server reboot? The swap -s amount is what we should be looking at for Oracle databases? Why does the zpool show 41GB? Would this be volume based? Thanks!
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
Rhiaanon44Author Commented:
sorry rpool is 4.1gig
0
 
Brian UtterbackPrinciple Software EngineerCommented:
The total swap amount should remain unchanged over a reboot unless you used "swap -a", since the swap added by swap -a would not automatically
be added again. Yes, you should be looking at the swap -s output in general.
0
 
Rhiaanon44Author Commented:
Couple of more questions. Where would total swap be in a ZFS file system ? Swap -l shows:

 swap -l
swapfile             dev  swaplo blocks   free
/dev/zvol/dsk/rpool/swap 256,1      16 4194288 4194288
/dev/zvol/dsk/rpool/swap2 256,3      16 41943024 41943024

I am trying to find the file for total swap space. Would the Format command show me where the swap file is located? It should be on slice 0, correct? Our admin left so those of us with some basic knowledge are trying to access the system for an audit. By the way, is it possible to make total swap space the same on multiple servers? Thanks again!
0
 
arnoldCommented:
Usually swap has its own raw partition.
Yes, format should include the information on a swap allocation.  You have to know on which disk it was setup.

You could add swapfiles to reach the same amount, but usually you would add swap on systems that needed as opposed to reserving the space for use as swap if it is unneeded.
0
 
Rhiaanon44Author Commented:
I ran the Format command and the it showed no disks found. Are things configured differently in ZFS?
0
 
arnoldConnect With a Mentor Commented:
Your system is then configured to boot from ZFS .
The swapfiles in this case will be as you've displayed them.
http://www.solarisinternals.com/wiki/index.php/ZFS_Troubleshooting_Guide#Configure_a_ZFS_Root_File_System_With_Zone_Roots_on_ZFS
0
 
Brian UtterbackPrinciple Software EngineerCommented:
When you are using a zvol, the actual location of the data can be anywhere in the zpool. Since you are using an rpool, this means that it will be located entirely on the root disk, but you can't really say where.  You can get more info by running:

zpool status rpool
0
 
Rhiaanon44Author Commented:
Thank you experts! Each of your responses has been a huge help!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.