1846593 Members
1146 Online
110256 Solutions
New Discussion

Question on swapinfo

 
Padmini_2
Occasional Advisor

Question on swapinfo

Hi,
We have a 712MB swap space.
We added a 10MB file system swap space with swapon with the following inputs.
swapminimum - 0
swapmaximum - 10MB
reserved - 0
priority - 1

When we ran the swapinfo the following was the output


Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 524288 42208 482080 8% 0 - 1 /dev/vg00/lvol2
dev 204800 41224 163576 20% 0 - 1 /dev/vg00/swap1
localfs 10240 0 10240 0% 10240 0 1 /home1/paging
reserve - 350048 -350048
memory 381360 229536 151824 60%


However, if we just run the following, to get the maximum swap space,


echo swapspc_max/D|adb -k /stand/vmunix /dev/kmem|tail -1

shows only 712 instead of 722.
Do we need to reboot for the kernel parameters to get updated?

Thanks
Padmini



8 REPLIES 8
Padmini_2
Occasional Advisor

Re: Question on swapinfo

Hi,
We used sam to add this swap. Does that make a difference?

Thanks
Padmini
Geoff Wild
Honored Contributor

Re: Question on swapinfo

What do you get with a simple

swapinfo -a

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Padmini_2
Occasional Advisor

Re: Question on swapinfo

Hi,
The output of swapinfo -a is as follows:

Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 524288 42208 482080 8% 0 - 1 /dev/vg00/lvol2
dev 204800 41224 163576 20% 0 - 1 /dev/vg00/swap1
localfs 10240 0 10240 0% 10240 0 1 /home1/paging
reserve - 351140 -351140
memory 381360 229536 151824 60%


Thanks
Padmini
Geoff Wild
Honored Contributor

Re: Question on swapinfo

I believe you are right - in order to pull it out of the kernel you will have to reboot. The swapspace is available and will be used if needed without a reboot.



Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
G. Vrijhoeven
Honored Contributor

Re: Question on swapinfo

Hi Padmini,

I would like to point out that your localfs swap space has the same proi as the swap lvols. I should change that also if you reboot to alter maxswapchunks..

Gideon
Bill Hassell
Honored Contributor

Re: Question on swapinfo

Filesystem swap space is handle very differently than raw volume swap space since it must go through the filesystem code. That makes computation of available swapspace a bit more complicated. As mentioned, you definitely want to change the priority for filesystem swapspace to a larger number so that it is used after all the raw swapspace has been used. There is a 20%-35% penalty in using filesystem swapspace due to all the overhead in the filesystem (which doesn't exist in raw volumes). swapinfo -tm is a good tool to see all of your active swapspace.


Bill Hassell, sysadmin
Srinivas Thokala_1
Frequent Advisor

Re: Question on swapinfo

After adding extra swapspace of 10MB, make sure you made the entries in /etc/fstab for the newly created swap.
Then run #swapon -a to activate the swap.
Verify with the command # swapinfo -a
or #swapinfo -atm

No need to reboot the system to activate the newly created swap space, provided /etc/fstab entries are correct before activating it.

-Srini
Srinivas Thokala
Srinivas Thokala_1
Frequent Advisor

Re: Question on swapinfo

If you've used SAM, make sure you've not added a mount point to the configured swap,
but is only a file system of 10MB space. Also give the correct priority.

-Srini
Srinivas Thokala