1834811 Members
2904 Online
110070 Solutions
New Discussion

How to manage memory ???

 
SOLVED
Go to solution
OLIVA_1
Regular Advisor

How to manage memory ???

Hello,

I need your help to manage memory on one of our server.
This server has 8Gb RAM and 10Gb swap.
Sybase runs on this server and I allocate 6Gb to it.
Someone can explain me why the 6Gb allocated to Sybase appears in "total" line below ?

cpatl3:/home/bb/bb/etc#swapinfo -t
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 2097152 25792 2071360 1% 0 - 1 /dev/vg00/lvol2
dev 2097152 25340 2071812 1% 0 - 1 /dev/vg00/swap4
dev 2097152 25664 2071488 1% 0 - 1 /dev/vg03/swap2
dev 2097152 26024 2071128 1% 0 - 1 /dev/vg03/swap3
dev 2097152 22124 2075028 1% 0 - 1 /dev/vg01/swap5
reserve - 7105536 -7105536
total 10485760 7230480 3255280 69% - 0 -

What does this 69% means ? RAM and swap are mixed ?
I wish know which RAM is free and which swap is free....

Thanks,
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: How to manage memory ???

swapinfo -tam might help.

A definition might help. HP-UX defines available memory as Physical Memory plus swap.

If you are having issues, one thing comes to mind.

All your swap areas have the same priority.

When I set up multiple areas I set them up in cascading priority. That one there is less I/O and channel contention when they are not all in use.

As I always do in such caes, I'm attaching a series of monitoring scripts that might help you pin down any problems.


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
A. Clay Stephenson
Acclaimed Contributor

Re: How to manage memory ???

Reserve simply means the amount of memory needed for currently executing processes that could be needed but has not yet been used from the actual swap areas. You are really using ~1% of your swap space. Do a vmstat -v and note the pageout rate. If the po rate is anything above very low values then you are feeling memory pressure and might consider reducing the Sybase usage slightly. You might also consider reducing the size of your buffer cache.
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: How to manage memory ???

Hi:

You might find Technical Knowledge Base document #KBAN00000895 ("The facts about swap space, including a definition of pseudo swap") provides you will the insights you want.

Regards!

...JRF...
Elena Leontieva
Esteemed Contributor

Re: How to manage memory ???

The psuedo swap is disabled on your system, which is OK because you have device swap space larger than memory. Although the default kernel parameter swapmem_on=1.

The swapinfo output gives you the virtual memory configuration on your system.

The "total" means the total amount of process space.
Sridhar Bhaskarla
Honored Contributor
Solution

Re: How to manage memory ???

Hi,

69% is a total of swap used+reservation. Whenever a process is started, the kernel will reserve swap for it for future use. This way the system ensures that there is enough space available in the swap area in case if it has to swap the process later.

I would be worried about the "KB Used" column appearing in only 'dev' rows. That is the amount of swap *physically* consumed by your processes. Your situation indicates that you may not have free memory. Use "vmstat 2 2" and look at the free pages column. Multiply with 4k and you will get the free memory in KB.

I would like to make one suggestion.

1. If vg03 has only one disk, then you may want to merge swap2 and swap3. Since these two are set to the same priority, interleaving will occur on the same disk and it will lead to slowdown.
2. If possible remove swap4 from vg00 and club it with either swap5 or in vg03 if possible.
3. Set the priorities to 0 for all the swap volumes in external volume groups and leave 1 for lvol2. Root disk will be the last one you would like to use for swapping.

I would configure the swap devices in the following way.

Device - Size - Priority
/dev/vg00/lvol2 - 2GB - 1
(you cannot change lvol2 now)
/dev/vg03/swap2 - 4 GB - 0
(if you have only one disk in vg03. if swap2 and swap3 are on different disks, then you can leave them as they are and change the priority to 0)
/dev/vg01/swap5 - 4 GB - 0

-Sri
You may be disappointed if you fail, but you are doomed if you don't try