1828657 Members
7717 Online
109983 Solutions
New Discussion

Swap memory level

 
SOLVED
Go to solution
Subentu
Frequent Advisor

Swap memory level

I have a Rx7620 machine running HP-UX 11iv2. And it has 16GB of physical memory.

How do I calculate the sufficient swap space?

Thanks
10 REPLIES 10
Dennis Handly
Acclaimed Contributor
Solution

Re: Swap memory level

What does this show: swapinfo -tam
Subentu
Frequent Advisor

Re: Swap memory level

#swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 0 4096 0% 0 - 1 /dev/vg00/lvol2
dev 12000 0 12000 0% 0 - 1 /dev/vg00/lvol10
reserve - 9407 -9407
total 16096 9407 6689 58% - 0 -
Venkatesh BL
Honored Contributor

Re: Swap memory level

Subentu
Frequent Advisor

Re: Swap memory level

Thanks a lot.

I have 15.7GB of swap. It rarely uses more than 10% of the swap space. So can I safely assume there is enough swap in the system?
Dennis Handly
Acclaimed Contributor

Re: Swap memory level

Your swapinfo doesn't show a "memory" line so you need to change the kernel parm swapmem_on=1, mentioned in Venkatesh's link.

Your current swap usage is 58%. How much more usage will it get under your heaviest load?
Venkatesh BL
Honored Contributor

Re: Swap memory level

The 'swapinfo' output shows that there is only 'reserve' done on the system. So, looks like your RAM is good enough not to incur any page outs thus far.

From swapinfo man page:
"When a process is created, or requests additional space, space is reserved for it by increasing the space shown on the reserve line above. When paging activity actually occurs, space is used in one of the paging areas (the one with the lowest priority number that has free space available, already allocated), and that space will be shown as used in that area."

But, as Dennis mentioned, you need to analyse the peak load requirements to arrive at a suitable swap size.
Rasheed Tamton
Honored Contributor

Re: Swap memory level

As said above, you are using 58% and only with enough metrics, you would be able to make the correct conclusion.

You have 16GB RAM and you have 15.7 GB device swap. Current usage is 58%

The pseudoswap (kctune|grep swapmem_on) is disabled from the default value of 1 to 0. Is there any reason for that.

Please post the output of kctune|grep dbc


Regards.
Subentu
Frequent Advisor

Re: Swap memory level

Thanks for the replys.

#kctune|grep dbc
dbc_max_pct 2 2 Immed
dbc_min_pct 2 2 Immed
Rasheed Tamton
Honored Contributor

Re: Swap memory level

I think your dbc* info is already tuned as per your system requirements (?) and set it as 327 MB.

If you have glance, use glance -m to see the detailed memory usage.

Currently your system is setup in a way that you want to use the max (15.6GB) physical memory (pseudoswap disabled and 327MB for buffer cache) for your app/db.

If you are worried about swap size either you have to enable pseudoswap or add another device swap.
Mridul Shrivastava
Honored Contributor

Re: Swap memory level

Have a look at the following thread:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1232644
Time has a wonderful way of weeding out the trivial