Operating System - HP-UX
1825768 Members
2070 Online
109687 Solutions
New Discussion

Re: How to determine if system swapping is taking place

 
SOLVED
Go to solution
Jerry Sims
Advisor

How to determine if system swapping is taking place

How do you determine if your system is swapping
? Does the "swpainfo -ta" tell you ? Do you look for the "vhand" process to be executing ?
This is the output from my "swapinfo -ta" :


root@DALUXCLE # swapinfo -ta
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 2097152 12004 2085148 1% 0 - 1 /dev/vg00/lvol2
dev 2097152 12080 2085072 1% 0 - 1 /dev/vg01/lvol1
reserve - 571696 -571696
memory 735080 429580 305500 58%
total 4929384 1025360 3904024 21% - 0 -


Learn More
9 REPLIES 9
Ken Hubnik_2
Honored Contributor

Re: How to determine if system swapping is taking place

If you have Glance it shows swap ins and outs. You can also run the mem command.
> mem
It tells you if the system is swapping.
James Murtagh
Honored Contributor

Re: How to determine if system swapping is taking place

Hi Jerry,

Basically you are looking for any usage of your swap devices (marked as dev here). So, basically, you are swapping. Reserve is just what processes have reserved in case they need to swap and memory is just psuedo swap.

Also, swapinfo -tam may be easier to read?

Regards,

James.
Jerry Sims
Advisor

Re: How to determine if system swapping is taking place

Don't have glance, and the "mem" command does
not work. The man page on "mem" indicates it's
"/dev/mem", but I receive error :
"Execute permission denied"
My login id is "root" ?
Learn More
James Murtagh
Honored Contributor

Re: How to determine if system swapping is taking place

Hi Jerry,

The use sar with the w flag :

# sar -w 1 2

HP-UX carrera1 B.11.11 U 9000/782 10/16/02

16:49:10 swpin/s bswin/s swpot/s bswot/s pswch/s
16:49:11 0.00 0.0 0.00 0.0 98
16:49:12 0.00 0.0 0.00 0.0 113

Average 0.00 0.0 0.00 0.0 105

Or you can use vmstat (look for si and so columns)....

Regards,

James.
Ken Hubnik_2
Honored Contributor

Re: How to determine if system swapping is taking place

try doing a which on mem. Mine is in /sbin/mem. What version of O/S??
Ted Ellis_2
Honored Contributor

Re: How to determine if system swapping is taking place

In most cases that I have seen, if you system actually starts to require swap (paging) to keep up with running processes, the load on you server will be extremely high and vhand will be seen as a top user.

the servers do not like to page in and out...

Ted
S.K. Chan
Honored Contributor
Solution

Re: How to determine if system swapping is taking place

That's the first thing you do, yes, "swapinfo -tam". I see you got equal sized device swap (lvol1 and lvol2) and on different VG, with same prio. Very good ! Right now from the output, your system is swapping, not that it's bad as long as you have enough swap space configured. The "memory" line represent the pseudo swap which is used for reserving processes, very important .. the utilization of pseudo swap DOES NOT affect your system performance, so do not worry about this line. The one you should look at are the "dev" line. Right now since the % of utilization is bigger than 0, it means it's swapping. Since you got them set up in interleave mode you will notice that both swap spaces are used concurrently, so at least you got an "efficient swap" mechanism.
MANOJ SRIVASTAVA
Honored Contributor

Re: How to determine if system swapping is taking place

Hi


Galnce tell you the current or the dyanmic stuff , also if you want you can load this simple c program which tell you the detalis like :

Memory Stat total used avail %used
physical 32764.0 8058.4 24705.6 25%
active virtual 531.3 128.9 402.4 24%
active real 597.0 136.0 461.0 23%
memory swap 26522.5 3738.2 22784.3 14%
device swap 2378.0 2365.5 12.5 99%

A. Clay Stephenson
Acclaimed Contributor

Re: How to determine if system swapping is taking place

Actually, it's very simple. Run vmstat and look at the 'po' (Page Outs) column. It's about the only useful metric in vmstat. A small number of page outs may occur even if you are not swapping if any of your applications use memory mapped files.

It appears that you have plenty of swapspace and probably more than enough since you are using pseudoswap. It's very common these days to have large amounts of memory (>16GB) and yet run only 512MB of swap if pseudoswap is enabled.
If it ain't broke, I can fix that.