?
Solved

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

Posted on 2011-05-11
11
Medium Priority
?
700 Views
Last Modified: 2013-12-27
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!
0
Comment
Question by:Rhiaanon44
  • 5
  • 3
  • 3
11 Comments
 
LVL 81

Expert Comment

by:arnold
ID: 35737450
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
 
LVL 22

Accepted Solution

by:
Brian Utterback earned 1000 total points
ID: 35737463
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
 

Author Comment

by:Rhiaanon44
ID: 35737880
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:Rhiaanon44
ID: 35738750
sorry rpool is 4.1gig
0
 
LVL 22

Expert Comment

by:Brian Utterback
ID: 35740130
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
 

Author Comment

by:Rhiaanon44
ID: 35745734
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
 
LVL 81

Expert Comment

by:arnold
ID: 35745800
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
 

Author Comment

by:Rhiaanon44
ID: 35745856
I ran the Format command and the it showed no disks found. Are things configured differently in ZFS?
0
 
LVL 81

Assisted Solution

by:arnold
arnold earned 1000 total points
ID: 35745898
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
 
LVL 22

Expert Comment

by:Brian Utterback
ID: 35746586
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
 

Author Closing Comment

by:Rhiaanon44
ID: 35753872
Thank you experts! Each of your responses has been a huge help!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month14 days, 3 hours left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question