Operating System - HP-UX
1833053 Members
2617 Online
110049 Solutions
New Discussion

swapinfo -ta interpretation

 
SOLVED
Go to solution
Wenth Leopold
Occasional Advisor

swapinfo -ta interpretation

i have a system hp-ux 11.11
when i do swapinfo -ta
i get the following
rm81m,sys,root # swapinfo -t
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 20971520 20460220 511300 98% 0 - 1 /dev/vg00/lvol2
dev 6291456 6291076 380 100% 0 - 1 /dev/vg00/lvol33
dev 524288 0 524288 0% 0 - 2 /dev/vg00/lvol36
dev 10289152 0 10289152 0% 0 - 2 /dev/vg00/lvol37
reserve - 11324932 -11324932
memory 12948956 12934984 13972 100%
total 51025372 51011212 14160 100% - 0 -
rm81m,sys,root #

the question i am raising is about the priority
as you can see in prio 1 i am almost at 100 %+

why is prio 2 not utilized ?

what happens if i only assign prio 1 ??
stay small think large
7 REPLIES 7
Jeeshan
Honored Contributor

Re: swapinfo -ta interpretation

Priority 1 indicating the order in which space is taken from the devices and file systems used forpaging.Space is taking the lower priority values first.

if you assign prio 1 it will assign all swap space gradually. and will increase your systems activities.
a warrior never quits
Venkatesh BL
Honored Contributor

Re: swapinfo -ta interpretation

If you think all disks have similar characteristics, then, you can assign the same priority value (1) for all of them.

Typically, if someone is adding a file system swap, then, the priority of that needs to be higher, because, file system swap is slower than the disk swap.
Ralph Grothe
Honored Contributor

Re: swapinfo -ta interpretation

If you know that LVs /dev/vg00/lvol3[67] really reside on different disks (you can issue an lvdisplay -v on them to find out) then interlacing the swap by assigning same priority to all swap devices could make sense I would think.
Otherwise if your vg00 only contains of two mirrored PVs (as usually) I think it wouldn't be sensible to give all swap devs the same priority.
As for filesystem vs. device swap, although it is good practice to explicitly assign the FS swap a lower priority (e.g. by the options field in fstab) the system really doesn't care and would always prefer to use dev swap first whenever available for performance reasons.
This is also stated in man 1m swapon.
Madness, thy name is system administration
James R. Ferguson
Acclaimed Contributor

Re: swapinfo -ta interpretation

Hi Wenth:

> why is prio 2 not utilized ?
> what happens if i only assign prio 1 ??

Numerically *lower* priority devices are used in preference to *higher* priority values. Hence, a value of <2> means that that device will be used *after* a devive with a priority of <1>.

The idea of making the swap device priorities unequal, especially when they reside on the same physical volume, is to avoid mechanical disk head movement should swapping ever occur. Of course, if/when you do actually perform swap I/O your performance is degrading anyway!

If you have multiple device swap spaces, equal priority assignments may interleave swap I/O helping an already bad situation.

My personal preference is to use *lower* values (i.e. 0) for the secondary device swap since the primary device (vg00/lvol2) is set at a priority one <1>. I don't like any extra I/O on vg00.

Regards!

...JRF...
Dennis Handly
Acclaimed Contributor

Re: swapinfo -ta interpretation

>when i do swapinfo -ta

You should always use -tam so the numbers are in megabytes and easier to understand.

Looking at the total line, you should also add more memory or swapspace since you are 100% used and/or reserved.
Steven E. Protter
Exalted Contributor

Re: swapinfo -ta interpretation

Shalom,

Swap priority numbers in swapinfo -tam do not display correctly in HP-UX 11.11

When I pointed out the problem HP told me they were aware of the problem and had no plans to fix it.

Swap priority set up manually or using sam to set up swap are taken into account. They just don't show up properly on the swapinfo screen.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bill Hassell
Honored Contributor
Solution

Re: swapinfo -ta interpretation

And just to put things in perspective: adjusting swap priorities among several disks is like rearranging the deck chairs on the Titanic. If you are paging (swapping) so much that priorities and disk speeds are important, you have a much, much bigger problem to solve: no RAM!!! You do not want to page out except occasionally (unless your users do not care about performance). Anf if your system writes a couple of pages out every few seconds, that disk priorities are meaningless.

Since you have 2 lvols at 100%, you are strangling your applications -- they are spending most of their time jumping back and forth between memory and swap disks. To see how bad it is, use this command:

vmstat | grep "page outs"

1-50 = is OK
50-100 = a slow system
more than 100 = crippled system due to lack of RAM

The choice is easy: live with the problem (and don't waste time with swap priorities), stop running so many applications, or double or triple the amount of RAM you have (users will be quite happy).


Bill Hassell, sysadmin