Operating System - HP-UX
1758661 Members
2228 Online
108874 Solutions
New Discussion юеВ

Re: How do I know swap usage is high or low?

 
Rashid Ali
Frequent Advisor

How do I know swap usage is high or low?

# swapinfo -tm
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 704 54 650 8% 0 - 1 /dev/vg00/lvol2
dev 220 56 164 25% 0 - 1 /dev/vg00/lvol4
reserve - 650 -650
memory 765 479 286 63%
total 1689 1239 450 73% - 0 -
# bc
sc=2
1239/1689
.73
#
Inside GlancePlus, I keyed in 'w' to see swap usage as below,

Swap Available: 1689mb Swap Used: 588mb Swap Util (%): 73 Reserved: 1238mb
Type 'm' to see memory usage as below,

Total VM : 427.2mb Sys Mem : 82.3mb User Mem: 457.4mb Phys Mem: 1024mb
Active VM: 127.3mb Buf Cache: 462.3mb Free Mem: 21.9mb

How come I got swap used is 588mb from GlancePlus and got 479mb from swapinfo?
How do I know swap usage is high or low?
Higher than 60% or 70% considered high?
Should I increase swap space to lower down swap usage? But it seems not true, because the swap used in two device swaps and not much.

Thanks in advance,


4 REPLIES 4
Rashid Ali
Frequent Advisor

Re: How do I know swap usage is high or low?

I got it. It is because swap used =54+56+479=589MB. But what is memory paging and which parameter can enable it? Is it swapmem_on? But the description says it indicates "Allow Memory to Exceed Swap Space" when swapmem_on=1, what does it mean? Also, the command swapon is fired in /sbin/init.d/swap_start to enable swap space.
Carsten Krege
Honored Contributor

Re: How do I know swap usage is high or low?

If swapmem_on=1 is set you enabled pseudo-swap. This is a concept that allows you not to do active swap space allocation if you have at least 25% of your memory unused (if you have still free memory, you won't starting paging anyway thus making swap space allocation unnecessary). HPUX handles pseudo-swap as if you have allocated the swap space in memory, but in fact you really don't allocate any swap space (neither in memory nor on disk).

A good description of the concept is in the Memory Management White Paper in /usr/share/doc/mem_mgt.txt (search for "Pseudo-Swap Space").

Carsten
-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
RAJESH GANGADHARAN
Regular Advisor

Re: How do I know swap usage is high or low?

if swapmem_on =1 it will use the free memory for paging
insted of paging to disk

Let the choices you make today be the choices you can live with tomorrow.
Rashid Ali
Frequent Advisor

Re: How do I know swap usage is high or low?

So if my memory usage is very high, always more than 98%. Should I set swapmem_on=0 ?