1835320 Members
2687 Online
110078 Solutions
New Discussion

Re: maximum swap

 
SOLVED
Go to solution
kholikt
Super Advisor

maximum swap

What is the maximum swap that HPUX 11.00 can support? I know I can increase maxswapchunks to accomodate additional swap space but is there any limit. My swap utilization at night sometime closed to 95-96% I was thinking of adding additional swap but at this moment I already have 25GB of swap space.

# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 601 423 59% 0 - 1 /dev/vg00/lvol2
dev 4000 606 3394 15% 0 - 1 /dev/vg00/lvswap
dev 20000 611 19389 3% 0 - 1 /dev/vg01/lvswap
reserve - 22164 -22164
memory 3963 892 3071 23%
total 28987 24874 4113 86% - 0 -
abc
10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: maximum swap

There is no real theoretical limit on swap for HP-UX.

Long before you reach any limit, your system will go so slowly you'll pull any hair you have left out waiting for any command to run.

If you are thinking about running swap much higher than twice physical memory, you need more physical memory.

Between 1.5 and 2.0 times physical memory is considered optimal, but you'll get some debate on that.

Based on your swapinfo, you have 25 Gig of Swap and around 4 Gigabytes of RAM.

In my experience, adding swap will not help. It will impede system performance. Before you add any more swap, add memory, you'll get better performance.

I'm attaching some performance measurement scripts that will show you whether your bottleneck is swap or memory.

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
V.Tamilvanan
Honored Contributor
Solution

Re: maximum swap

Patrick Wallek
Honored Contributor

Re: maximum swap

The maximum swap space is dictated by the maxswapchunks kernel parameter, which in HP-UX 11.0 has a max value of 16,384 which allows you to have 32,768 MB of swap space.

By the way, here is a web page for the maxswapchunks kernel parm:
http://docs.hp.com/hpux/onlinedocs/939/KCParms/KCparam.MaxSwapChunks.html

But instead of worrying about adding swap space, I'd worry more about adding more RAM. You are VERY SERIOUSLY short of RAM if you have that much swap space and it actually being utilized that extensively. You can get RAM very cheaply from Kingston, Dataram or Crucial and it works every bit as well as HP RAM at about 10-20% of the cost of HP RAM.

What type of machine is this? How much RAM does it have? What application(s) are you running?

Con O'Kelly
Honored Contributor

Re: maximum swap

First off how much memory have you got??
Your problem is much more likely to be addressed by adding additonal memory or investigating what processes are using your memory?

The idea is to ensure that your system does not swap at all. Once a system starts swapping, performance severely suffers.

My advice is to look at your memory issues & why the system is swapping in the first place.

Cheers
Con
Steven E. Protter
Exalted Contributor

Re: maximum swap

I'd be very interested in knowing what applications you are running.

I learned something new from Patrick, thanks for that.

I've read the links and Patrick's comments and the issue here is not swap, its RAM.

Please note that I've spoken to several HP CE's who stated if you put non HP ram in a system it invalidates the hardware contract.

I don't take that as the gospel, but if you want to maintain a hardware contact, it is something to think about.

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
Patrick Wallek
Honored Contributor

Re: maximum swap

SEP and others,

I have been told by HP CEs that IF we were to put non-HP ram in a machine and IF there happened to be a problem that MIGHT be related to RAM then the first thing they would do is pull out the non-HP RAM. If that happens to solve the problem then you might have to pay for a time-and-materials support call. :( BUT if the problem is unrelated to RAM, then what they don't know won't hurt them. ;)

If HP would get realistic on their RAM pricing then we customers wouldn't have to resort to non-HP products. But as it is now, I recommend buying a minimum amount of HP Ram in the machine and the rest 3rd party. It can cut the price of a machine by SEVERAL THOUSANDS of $$$$$.
Bill Douglass
Esteemed Contributor

Re: maximum swap

Actually, you're not using that much swap. According to the numbers you posted, this system is using about 1.8GB of swap out of 25GB. Also, memory allocation is at 23% (67% of RAM is free). You have 22GB of reseerved space, which is swap that has not been allocated so far.

Try tunning vmstat doring the night and checking for high po values, indicating memory pressure.

Also check on sar -u for cpu wait I/O time, sar -b for buffer cache hots and misses, and sar -d for the amt. your disks are busy.
Con O'Kelly
Honored Contributor

Re: maximum swap

Hi

I've noticed there is an assumption that the memory line in swapinfo output is indicitive of RAM in the system.
I'd always assumed that this figure was not related to Physical RAM. Anyone want to clarify this??
If you don't have glance then the "free" column (4K pages)in vmstat is a more reliable indicator of free memory.
I'd be looking very carefully at what your memory usage is - glance (-m option) can give you a good idea.

Cheers
Con
twang
Honored Contributor

Re: maximum swap

When a program is executed, the newly created process will consume memory. This memory is used to hold the process' text, data and stack areas. These areas are stored in memory in units of pages. The working set changes as the program is executed. As the number of processes on a node increases, the available memory will decrease. When the available memory drops to some threshold point, the o/s needs to take action in order to 'free up' some memory. This is accomplished by moving pages from memory to disk. This is known as 'paging'. The o/s will always try to move pages that are not in a current working set. So we cannot say how much swap space we need, but a general rule is 2 times of physical memory.
Hope this can give you some hints.
Trond Haugen
Honored Contributor

Re: maximum swap

You real problem has already been addressed but the answer to the question about what the maximum swap can be theoretically is one terabyte (1.09 trillion bytes). Remember that total swap space is defined by: swchunk x maxswapchunks x DEV_BSIZE.
Can I take an order for those disks please. :-)

Regards,
Trond
Regards,
Trond Haugen
LinkedIn