Operating System - HP-UX
1834722 Members
2858 Online
110069 Solutions
New Discussion

what is in the swap space

 
SOLVED
Go to solution
huangqingsong
New Member

what is in the swap space

greetings,
i have a puzzle about swap space and paging.In my system,the output of "swapinfo -m" is:
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 0 1024 0% 0 - 1 /dev/vg00/lvol2
dev 4096 2903 1193 71% 0 - 0 /dev/vg00/lvswap2
reserve - 2213 -2213
memory 12689 8768 3921 69%

but i cannot find any pageouts with glance:
Event Current Cumulative Current Rate Cum Rate High Rate
Page Faults 2 33. 631.7
Page In .4 8. 293.5
Page Out 0 0 0.0 0.0 0.0
KB Paged In kb 352kb 4. 18.6
KB Paged Out 0kb 0kb 0.0 0.0 0.0


/dev/vg00/lvswap2 has been used by 71%, but pageout never occurs. what is in the swap space? can anyone clarify it for me?
Thanks in advance!
4 REPLIES 4
Massimo Bianchi
Honored Contributor

Re: what is in the swap space

Hi,
probably you have some application that prea-llocate large amount of memory.

But if this is never used, it remains in the "swap" and never get to memory.

Massimo

Bruno Vidal
Respected Contributor
Solution

Re: what is in the swap space

Hi,
It typacally looks like SAP application. It load lots of things in memory -> so it swapped, but it never use it, or not really often. Like you pointed, your system is not doing any page out, so you don't have any performance pb.

Cheers.
Stefan Farrelly
Honored Contributor

Re: what is in the swap space


All this means is that at one point your server USED 2903 MB of swap (ie 2903 MB of memory more than you physical memory was used), it may not be the case at the moment.

Use glance or vmstat to confirm how much free memory you have right now. If you have quite a bit of free memory thats why you are not seeing any pageouts. Swapinfo is not realtime - it doesnt reduce swap usage accurately once you have free memory again.

To get swapinfo to accurately show swap usage right now (not in the past) you have to reboot - its the only way.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Michael Steele_2
Honored Contributor

Re: what is in the swap space

USED PRI NAME
0% 1 /dev/vg00/lvol2
71% 0 /dev/vg00/lvswap2

You need to change your /dev/vg00/lvswap2 priority from 0 to 1 for its pre-empting /dev/vg00/lvol2 which is 0% used.

All priorities must be the same so they can be used concurrently, (* at the same time, *) and not first one and then the other like in this case.

The default priority is 1 and while 0 is allowed it pre-empts /dev/vg00/lvol2 which is your primary boot swap. It will be the first used by the O/S. You can check this with 'lvlnboot -v'.

So update your /etc/fstab file and reboot.
Support Fatherhood - Stop Family Law