1837997 Members
8159 Online
110124 Solutions
New Discussion

Re: Swap alway high

 
SOLVED
Go to solution
Thana
Occasional Contributor

Swap alway high

Hi all
Do you have any idea. If system alway use high swap. Is it time for add memory? How can I inestigate which process take high memory. (glance?)
6 REPLIES 6
Paul Eadington_1
Valued Contributor

Re: Swap alway high

Do you mean swap utilisation as returned by swapinfo -a is always high ??

You could add more memory.
You could add more device swap.
You could kill all the processes on your box, this would reduce loading.. might get you into trouble though :)

A quick and easy way to find out the process hogging the most memory is to type in the following.

UNIX95= ps -e -o ruser,vsz,pid,ppid,args | sort -nk2

The last process listed is the biggest memory user.
I had hair .. then I got into Unix
A. Clay Stephenson
Acclaimed Contributor

Re: Swap alway high

Do a vmstat. If the po (pageout rate) is greater than about 10 for any significant length of time then you are swapping too much and you need to increase memory or reduce the process load. Glance can identify these processes but ps can as well

UNIX95= ps -e -o vsz,comm,pid | sort -nr

will list the top memory users. Man ps for detaiils.

You may simply need to reduce your buffer cache usage.
If it ain't broke, I can fix that.
Rashid Hamid
Regular Advisor

Re: Swap alway high

Run vmstat command and check the output
I'm Parit Madirono/Parit Betak Boyz
Nguyen Anh Tien
Honored Contributor

Re: Swap alway high

have you correct kernel parameter.
there are two parameter: swchunk and maxswapchunk.
refer this link. I had answered.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=760481
hope this help
tienna
HP is simple
Paul Torp
Regular Advisor

Re: Swap alway high

are u using pseudoswap?

#kmtune | grep swapmem_on

if its 1 u are using pseodoswap.

that means the swapping also is used by memory.

U can turn this off if u have enough disk-swap (=memory)

If u are running a database e.g orcale u could also lower the dbc-max from 50 to 10 and only use the oracle sga.
If that oracle is running filesystem and not rawdevices u should mount it with mincache=direct and convosync=direct

If its a j2ee server it should NEVER swap.

If the application is a 32 BIT application u should set up memory-windows or it will begin swapping after using appx 4 GB memory.

Lots of "if's" here but, it all depends on u'r system.

-paul
"sendmail is kind of fun..."
Ted Buis
Honored Contributor
Solution

Re: Swap alway high

The important thing is to monitor page outs. If that parameter is >10 you need to take action. The is a big difference from reserving swap space and actually using it. Also, as pseudoswap gets "used" it will help make that number "high" but isn't a problem. If processes can start, and there are no page outs, then you don't have a problem. It is time to add memory if you are paging out (forget in), or check to make sure you don't have too high a buffer cache. It is time to add device swap and or memory if programs won't launch because exec can't reserve space for potential swapping.
Mom 6