1833695 Members
3824 Online
110062 Solutions
New Discussion

Swap space

 
SOLVED
Go to solution
Olga_1
Regular Advisor

Swap space

Hello,

We are getting new Itenium server with HP 11i ver 2. 73G HD, 16 G memory

I was wondering what is the recommended Swap space? Should I do 2 dev like on old servers:

dev 4096 /dev/vg00/lvol2 ---> SWAP/DUMP
dev 4000 /dev/vg00/lv_swap07 ----> SWAP

Thank you.

6 REPLIES 6
Steven E. Protter
Exalted Contributor
Solution

Re: Swap space

Shalom,

Minimum swap is half of RAM. I've seen people do less and then the system is unstable.
How much you need really depends on what you are doing.

I am a member of the A. Clay Stephenson school of swap allocation. That means allocate a small , fast area as primary and then a large secondary area with lower priority.

That way if the system is stressed you don't have to reboot to get more swap, but in normal operations you won't be slowing down.

If it were mine:
8 GB swap/dump priority 1
8 GB swap priority 2 (so it doesn't get used)

That should be enough with a big memory system. It may seem like a waste of space, but I NEVER want to boot a box during prime time.

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
dictum9
Super Advisor

Re: Swap space


What application is running on it and what does it require? I would say 16GB of swap is good.


Patrick Wallek
Honored Contributor

Re: Swap space

If it were my server I would create 4 GB of swap initially and make sure that the swapmem_on kernel parameter is set to 1.

This will allow you to use all 16GB of RAM.

From there I would monitor swap and RAM usage. If necessary it is relatively easy to add more swap.

A critical thing to do to make sure your RAM usage is not too high is to REDUCE dbc_max_pct from 50. For a 16GB system, I would set it at around 8 which gives you approximately 1.2 GB of buffer cache if/when it hits its max.
A. Clay Stephenson
Acclaimed Contributor

Re: Swap space

Since you have 73GiB drives and since you really should use vg00 for anything other than OS, the best use of these drives is to configure separate swap and dump areas. It's no longer necessary to compress and save the dumps to /var because the dump will not be overwritten by swap --- this can save valuable minutes during a reboot.

I would create a 4GiB Primary swap (25% of memory) and enable pseudoswap. Monitor your swap usage and if you need to add additional swap, it's so easy additional swapspace that it's not worth worrying about --- as long as you leave some unconfigured space on your disk. Now create a dump area of 16GiB (might as well, you have the room) and you should be good to go.

NOTE: Every dab of swapspace should be mirrored and dump should never be mirrored.
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: Swap space

Hi Olga:

The amount of swap space that you require depends on you application needs.

If you are Igniting the server yourself, I'd create a primary swap equal to your physical memory and enable pseudoswap ('swapmem_on' = 1).

If you have a pre-installed server, I'd add enough secondary swap to bring the total space to 16GB and enable pseudoswap too. The addition of a secondary swap space to vg00 is OK. Simply specify the secondary swap priority to zero (0) where the primary swap priority is one (1). This will cause the secondary space to be used in preference to the primary space and should you ever actually swap, reduce disk head contention between the two spaces.

Regards!

...JRF...
Olga_1
Regular Advisor

Re: Swap space

Thank you all.