Operating System - HP-UX
1834198 Members
2397 Online
110065 Solutions
New Discussion

The system doesn't use the primary swap

 
SOLVED
Go to solution
antoniou
Occasional Advisor

The system doesn't use the primary swap

when I do "swapinfo -a", I see that the first swap partition isn't use.
dev 2097152 96 2097056 0% 0 - 1 /dev/vg00/lvol2
dev 2048000 300948 1747052 15% 0 - 0 /dev/vg00/swap2
reserve - 696424 -696424
Sometimes the swap2 partition is full used, and the lvol2 partition is 0% used.
The reserved size is very hight, I juste have one test database on this server, how can I reduce de memory and swap space reserved by bprocesses?
4 REPLIES 4
RAC_1
Honored Contributor
Solution

Re: The system doesn't use the primary swap

The priority of secondary swap (/dev/vg00/swap2) is set to 0, so it will be used first. The priority of (/dev/vg00/lvol2) is 1, so it will be used after /dev/vg00/swap2 is fully used.

Are thay on same disk?? If yes, that is bad design. You can reduce the swap space reserved by a process. Every process that you start will reserve a swap space. This is required, because in case the process has to swap, it have the sapce available. so that is the design of the OS.

Anil
There is no substitute to HARDWORK
A. Clay Stephenson
Acclaimed Contributor

Re: The system doesn't use the primary swap

This is perfectly logical. Note that your priority of /dev/vg00/swap2 is set to higher priority (0) than that of your primary swap (1). This means that all priority 0 swap will be used before any swap priority 1 will be used. Swap area with equal priorities will interleave among themselves BUT if these swap areas reside on the same physical device YOU DO NOT WANT THIS because the head will moving like crazy as it spreads the swap out over the same device.

Now, having said this, it really doesn't matter all that much because once your box starts paging out to any significant degree, it's performance is so bad that worrying about swap layout is akin to rearranging the deckchairs on the Titanic.
If it ain't broke, I can fix that.
Steven E. Protter
Exalted Contributor

Re: The system doesn't use the primary swap

If you'd rather the primary swap gets used first, you can reverse the priority.

On our servers which have only two local disks it actually makes no difference. The swap is mirrored and no matter how many areas I have they're on the same physical disk.

There is an display flaw in swapinfo that sometimes incorrectly reports swap priority but not use like you're seeing. I asked HP if they were planning on fixing that flaw and they said no.

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
antoniou
Occasional Advisor

Re: The system doesn't use the primary swap

Ok for priority, but for processes which reserve swap space, can I reduce this reserved space, actually I have another server which have 4Go of reserved swap after the boot.
I must have 8Go of swap space for compilations and other processes, and sometimes I have some problems with no space in swap.
I can reserve more swap space but it's very strong.