System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

swap space below 10 percent free

SOLVED
Go to solution
Bruno Vilardo
Regular Advisor

swap space below 10 percent free

Hello All,

I am getting this error message in /var/adm/messages.
I have already checked the swap space using TOP and swapon -s and apparently it´s ok.
Here is the OUTPUT for TOP and SWAPON -S

TOP=

load averages: 2.76, 2.05, 1.52 10:34:00
205 processes: 5 running, 49 sleeping, 151 idle
CPU states: 98.6% user, 0.0% nice, 1.3% system, 0.0% idle
Memory: Real: 632M/991M act/tot Virtual: 99M/1999M use/tot Free: 1568K

PID USERNAME PRI NICE SIZE RES STATE TIME CPU COMMAND
19020 grseqgm 56 0 70M 4530K run 29:36 98.70% _progres
18105 polgroff 44 0 217M 9584K sleep 0:12 0.40% _progres
23430 root 44 0 5728K 3203K run 0:00 0.20% top
4511 root 44 0 20M 229K run 0:00 0.00% _mprshut
625 root 44 0 44M 196K run 0:00 0.00% _mprshut
4470 root 44 0 44M 196K run 0:00 0.00% _mprshut
510 root 44 0 6280K 442K sleep 0:38 0.00% insightd
476 root 44 0 1968K 131K sleep 0:31 0.00% snmpd
11062 root 44 0 9456K 1204K sleep 0:29 0.00% Xdec
21410 poaromeu 44 0 217M 10M sleep 0:25 0.00% _progres
191 root 44 0 1752K 114K sleep 0:11 0.00% syslogd
17048 polsalda 44 0 216M 9650K sleep 0:06 0.00% _progres
8031 root 44 0 1872K 237K sleep 0:06 0.00% telnetd
2188 root 44 0 13M 335K sleep 0:02 0.00% _mprosrv
31236 root 44 0 21M 278K sleep 0:02 0.00% _mprosrv


SWAPON -S =

swapon -s
Swap partition /dev/vol/rootdg/swapvol (default swap):
Allocated space: 255936 pages (1999MB)
In-use space: 12798 pages ( 5%)
Free space: 243138 pages ( 94%)


Total swap allocation:
Allocated space: 255936 pages (1999MB)
Reserved space: 120289 pages ( 46%)
In-use space: 12798 pages ( 5%)
Available space: 135647 pages ( 53%)

Dooes anyone knows what this could be ?

Thanks a lot .

Bru
6 REPLIES
Michael Schulte zur Sur
Honored Contributor
Solution

Re: swap space below 10 percent free

Hi Bruno,

this problem occurs, when programme reserve a lot of memory and never really use it.
When you have set swapping to eager then this reserving immediately goes to the swap file. I usally do:
rename /sbin/swapdefault # 4.0X
set eager-swap in /etc/sysconfigtab to 0 # 5.X

Unless you have a cluster, where I remember it is recommended to be swap set to eager it is much easier on the memory.

hth,

Michael
Blake Roberts
Frequent Advisor

Re: swap space below 10 percent free

Like Michael said, the memory is getting reserved by the application. One of the safest ways to change it is to use dxkerneltuner.

In the vm subset, set vm_swap_eager=0. This will require a reboot for it to take effect. The only caution is that since you do not have a lot of swap space out there, if you do have a lot of processes going into swapping, you can end up having serious issues with the system if all of your swap space gets subscribed.

Regards,
--Blake
Bruno Vilardo
Regular Advisor

Re: swap space below 10 percent free

Hello Guys,

Well Thanks for the answer .
But we do have swap space.
Well that´s what i figured out looking for the SWAPON command.
Am i right ?

So i am going to check these steps you told me to.
But after i rename the /sbin/swapdefault , is it creating again ?

Thanks a lot guys .

Bruno






Michael Schulte zur Sur
Honored Contributor

Re: swap space below 10 percent free

Hi,

Assuming, you have Tru Unix 4.0X, /sbin/swapdefault is a symbolic link pointing to the primary swap space. I rename it to swapdef to get it out of the way. It will not be created again. You will also notice that after a reboot the line with reserved space is missing in the output of swapon. Then watch for these warnings. They should not occur again.

hth,

Michael
Blake Roberts
Frequent Advisor

Re: swap space below 10 percent free

Bru,

My steps are for a 5.x system. Michael's steps are for the 4.x system. I'm not sure which version you have, but just match up these steps for the version that you are on.

hth,
--Blake
Mohamed K Ahmed
Trusted Contributor

Re: swap space below 10 percent free

Bruno,
Here are some information about swap and swap modes, hope it will help

The per-page/swap device free space is independent from the amount of page/swap space that is reserved.

In the default page/swap space reservation mode, when most pages of virtual memory are created a page of page/swap space is reserved for it. Not unlike reserving a room at a hotel or seat on an airplane except that you ARE guananteed to get the space when you need it.

Until the kernel actually has to write the page to the page/swap space, no specific space is allocated. The per-device free and in-use space is that allocated space. The reserved space is amount that can be promised as virtual memory is created.

When you don't have much page/swap space available for reservation, but lots of free space, it means that:

o You aren't paging. If you were, there would be more space in use.

o Your amount of page/swap space is probably close to the available physical memory.

o It may also be the case that many pages needing reserved space are sufficiently inactive that they are not consuming real memory; data space that can be written, but hasn't been and can be paged back in from the executable if needed.

Beware of advice that blindly suggests switching to lazy swap. This has advantages, but carries risks.
If you can trust that your total virtual memory usage won't exceed the sum of available memory and page/swap space, it can be pretty safe and allows more virtual memory use with less page/swap space.

However, if the space is needed for allocation (paging or swapping) and there isn't any, the kernel will start killing process to get their space back. I'm told it prefers "idle" processes, but if the short-fall is extreme lots of things start to look idle.

Whether you need more page/swap space depends on the answers to a couple of questions:

o How much paging can you tolerate?

o Will more be enough? Or, to put it a slightly different way, is there an upper boundary on the amount space that will be needed? If you can't predict that upper bound, then you can keep adding more and more as it is steadily consumed and the paging load becomes so great as to make the system unusable.

If you can predict an upper bound on virtual memory use, then that's probably how much page/swap space you need.

Mohamed