1820243 Members
2550 Online
109621 Solutions
New Discussion юеВ

Swap memory issue.

 
SOLVED
Go to solution
jeevarajkn
Frequent Advisor

Swap memory issue.

Dear guru,s


Server- HPUX IA -11.23

Phy.mem-6GB

Device Swap-8GB

we are facing very high swap utilization in server almost(80%)hence am planning to add secondary swap on the server.

I have two VG's Vg00 with 32GB free space and VG01 with 4GB free space.

First upon I want to know if am enabling secondary swap,is it reduce my swap utilization?

how much size I want to add as my secondary swap?

Whether I can use VG00 as my secondary swap or I want to use other VG's.

Awaiting for your valid inputs.



Reg

Jeevaraj Siavaraman
11 REPLIES 11
Dennis Handly
Acclaimed Contributor

Re: Swap memory issue.

As simple reality check is to provide the "swapinfo -tam" output during your heavy load.

A high device swap allocation isn't a problem unless you want to add more processes or you are having lots of "po" (page outs).
V. Nyga
Honored Contributor

Re: Swap memory issue.

Hi,

first, where do you see the swap utilization - glance, swapinfo or vmstat?

If you enable secondary swap then you devide the usage to two swap devices, but you don't change the reason. The server can become a bit faster if you use a second disk for the second swap, but is this what you want?

Any swap will slow down your server, it's recommended that you have enough RAM to prevent server from swapping.

HTH
Volkmar
*** Say 'Thanks' with Kudos ***
Ganesan R
Honored Contributor
Solution

Re: Swap memory issue.

Hi Jeevaraj,

>>we are facing very high swap utilization in server almost(80%)hence am planning to add secondary swap on the server.<<

>>First upon I want to know if am enabling secondary swap,is it reduce my swap utilization?<<

Most of the time people misunderstood this. If swap is highly utilised, it means you are running out of physical memory. Adding additional swap is not going to help on this situation.

First check the RAM usage using glance. If RAM is full, system has to free up some space for new process by swaping out to disk. Then after some time it has to bring back the swapped out process into memory. So system will be busy with swap in and swap out activities and nothing useful work will be done.

In this scenorio, either you have to find out the processes which use high memory and analyse if it really need that much memory or increase the physical memory on the server.
Best wishes,

Ganesh.
jeevarajkn
Frequent Advisor

Re: Swap memory issue.

Dear All,

Thanks for the quick repply.

Iam using swapinfo tro check the swap utilization as I dont have any other utility installed.

Am well aware that increasing swap will ot solve my issue. But Iam using the swapinfo command to check the utilization and the same has been configurd in sitescope(Monitoring tool) to get the alerts.As my current threshold is 80% am getting lot of alerts from sitescope and I don't want to reduce my threshold. Becauuse of this I want to decrease the utilization value from 80% to reduce the alerts.


reg

Jeevaraj
Dennis Handly
Acclaimed Contributor

Re: Swap memory issue.

>I am using swapinfo to check the swap utilization

Please provide the "swapinfo -tam" output so we can see it too.

>Am well aware that increasing swap will not solve my issue.

We don't know that yet.
Ganesan R
Honored Contributor

Re: Swap memory issue.

Hi,

We really do not know "what to you mean by high swap utilization" ?

Are you talking about swap reservation? or swap in and swap out activity?

If the reserved swap is high, then you have to increase the swap. If swap utilisation is high then you may need to increase physical memory.
Best wishes,

Ganesh.
V. Nyga
Honored Contributor

Re: Swap memory issue.

Hi,

what does 'vmstat -n' tells?

Real swapping is listed under pi and po.

If it's only swap reservation, then you can of course increase it.
As said above, another disk make sense then.

V.
*** Say 'Thanks' with Kudos ***
jeevarajkn
Frequent Advisor

Re: Swap memory issue.


Dear Guru's


Please find the swapinfo and vmstat output.


swapinfo -atm
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8192 1542 6650 19% 0 - 1 /dev/vg00/lvol2
reserve - 5031 -5031
total 8192 6573 1619 80% - 0 -



vmstat -n
VM
memory page faults
avm free re at pi po fr de sr in sy cs
995770 7435 47 45 4 2 0 0 7 846 15660 468
CPU
cpu procs
us sy id r b w
2 1 97 2 2 0
1 1 98
V. Nyga
Honored Contributor

Re: Swap memory issue.

Hi,

see 'man swapinfo' -
reserve: Paging space on reserve.
This is the amount of paging space that could be needed by processes that are currently running, but that has not yet been allocated from one of the above paging areas.

For your configuration your swap is ok, you have a high memory (RAM) usage, so you swap device is high used.
At the moment your server has swapped (paged out) 4 times and reread from swap (paged in) 2 times. But in which period? Does it happen oftener?
You should watch this server over a longer time.

You can add swap, but it will not change much, you'll have less than 80% then, but it's only reserved, not used.
If you add more RAM, then you have to increase swap too, but at the moment ... it's not a must.

Also you have two blocked processes - see
'man vmstat' -> Blocked for resources (I/O, paging, etc.)
Maybe you should check this.

For a detailed monitoring of a server 'glance' is very often mentioned in this forum, maybe you should think about a test installation.

V.

*** Say 'Thanks' with Kudos ***
Dennis Handly
Acclaimed Contributor

Re: Swap memory issue.

>Please find the swapinfo output.
reserve - 5031 -5031
total 8192 6573 1619 80%

You don't have a memory line. The first thing you should do is enable pseudo-swap with:
kctune swapmem_on=1
(This does require a reboot.)
jeevarajkn
Frequent Advisor

Re: Swap memory issue.

Dear Guru's

Thanks...I believe increasing the Phy.memory will be good iption.