1856511 Members
26374 Online
104113 Solutions
New Discussion

Re: Swap space

 
ricky_1
Frequent Advisor

Swap space

Hi Friends,

One of my hpux box a180c model having 10.20 HPux OS, is showing 90% swap space usage.

The buffer space allocation is static, will making it dynamic help in reducing the swap space usage?Any other suggestions?

The glance report is attached with this message.

Any help will be appreciated.
Thanxs
Believe in Yourself!!
6 REPLIES 6
Varghese Mathew
Trusted Contributor

Re: Swap space

Hi ,

Looks like lot of swapping occurs in your system, was there any changes made to the system or DB recently or in the environment atleast. get the outputs of #sar -d 5 5 to have a look on the disk queue length. Which has to be either equivalent or less then 0.50 otherwise there is potential IO choke also..

Check out the kernel parameter dbc_max_pct and verify that the value is between "8" and "12".(there is an exception to this if you have any large storage disk array like EMC). the value of dbc_min_pct can be kept "5".

It can be also due to heavy usage of system which in turn causes the system run short of Memory and start using the swap space.

Check out the output of sar -w 5 5 and verify the amount of swapping which occurs in the system. #swapinfo -t also gives a clear picture of how much of swapping is happening in the system..

Come back with more details:

Cheers !!!
Mathew
Cheers !!!
Santosh Nair_1
Honored Contributor

Re: Swap space

For one thing, change dbc_max_pct from the default setting of 50% to something much lower, like 20 or lower. This is memory that is being set aside for disk buffers and the 50% default is way too high in almost all cases. Besides, with only 512MB of ram, you don't want to dedicate half of that to disk buffer. Keep in mind that this is a kernel parameter change and as such will require a reboot.

-Santosh

Life is what's happening while you're busy making other plans
Frank Slootweg
Honored Contributor

Re: Swap space

Changing filesystem buffer cache to dynamic (DBC) instead of static will not change swap space *usage*. However making it dynamic *and* smaller (as others have also suggested) may decrease the memory pressure and decrease swapping (paging and swapping) *activity*.

The memory utilization ("Mem Util") is 97%, which is too high. Try to get it at around 95%. Getting it below 95% is not neccessary and is even 'bad' (see some of my responses in other, 'old', threads).

Swap space usage ("Swap Util") is rather high (92%), so you risk that processes will abort when they need to grow and that you can not start (m)any new processes.




Roger Baptiste
Honored Contributor

Re: Swap space

< Phys Mem: 512.0mb
Buf Cache: 256.0mb
Free Mem: 13.6mb >

Firstly, as shown in your glance output your current buffer cache setting is way too high. Get into dynamic cache setting and also reduce the dbc max and min to 10 and 5% respectively. That will ease up the pressure on memory. Next is your swap setting,
what is your current swap configuration? Can you post the output of swapinfo -mt?

-raj
Take it easy.
harry d brown jr
Honored Contributor

Re: Swap space

You need to change your dbc_min_pct to 5 and your dbc_mac_pct to 10. The 50% is the LAME HP default (god knows why!).


live free or die
harry
Live Free or Die
James R. Ferguson
Acclaimed Contributor

Re: Swap space

Hi Ricky:

You probably should reduce the 'dbc_max_pct' downward. If you are running something like Oracle which manages its own file buffers, you are wasting resources and actually double-buffering.

You can add more device swap without having to reboot (assuming that you have a sufficient value for 'maxswapchunks' already defined for your kernel. If you don't, you will need to regenerate your kernel to change it, but since you're going to change the 'dbc_max_pct' anyway...

In addition to the kernel tuning, you can use SAM to add more swap space. Ideally, construct a secondary device swap that is the same size as your primary, but on a different disk, and set its priority to the same as the primary's. In this way, you will achieve interleaving and improve performance.

A good way to monitor swap utilization is simply to use:

# swapinfo -tam

Regards!

...JRF...