1833871 Members
1805 Online
110063 Solutions
New Discussion

increase swapspace

 
atef_3
Contributor

increase swapspace

HP 9000 ,HP-UX 10.20
how can i increase swapspace ?
7 REPLIES 7
Ivan Krastev
Honored Contributor

Re: increase swapspace

See "Managing Swap and Dump" guidelines - http://docs.hp.com/en/B2355-90950/ch06s03.html


regards,
ivan
Steven E. Protter
Exalted Contributor

Re: increase swapspace

Shalom,

I usually plan my systems pretty well and don't often need to increase swap space. For beginners and those who don't do it often, the best bet is to go to sam.

sam
Disks and filesystems
swap

All swap changes require a reboot to become active.

Also note that increasing swap beyond twice system ram is not recommended. It merely slows you down in most cases.

If your system is under memory pressure the response that usually solves more problems is to increase actual memory.

swapinfo -tam
vmstat
http://www.hpux.ws/?p=6
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
Dennis Handly
Acclaimed Contributor

Re: increase swapspace

>SEP: All swap changes require a reboot to become active

I thought file system swap is immediate? (Though not the best idea.)
Steven E. Protter
Exalted Contributor

Re: increase swapspace

I interpreted the question as wanting to expand the existing swap file which requires a reboot. A filesystem swap increase is possible without a boot if I'm not mistaken.

Shmuel
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
James R. Ferguson
Acclaimed Contributor

Re: increase swapspace

Hi:

>SEP: All swap changes require a reboot to become active.

That's *not* the case. One uses the 'swapon(1M)' command to activate new filesystem or device swap. You can activate additional swap space without a reboot, but you cannot deactivate it without doing so.

>SEP: Also note that increasing swap beyond twice system ram is not recommended. It merely slows you down in most cases.

I don't believe that there is any basis for this. I rather think that there will be little benefit to doing that.

Some things that you don't want to do, however, are to place secondary swap space on the same physical disk as primary swap *unless* you set unequal swap priorities for the devices. WIth equal swap priorities, the primary and secondary swap devices will be written and read in an interleave. This will cause disk head movement to degrade performance as swap I/O were performed. Using equal priority on swap devices on different physical disk *is* considered desireable to spread I/O among disk.

That said, however, if you have insuffient memory to actually cause swap activity (measured by page-outs in 'vmstat' greater than single-digits), then you really need to add more physical memory to your system.

Primary swap effectively cannot be increased in size because it requires contiguous physical extents on disk. Finding immediately adjactent, unused extents to primary swap on vg00 isn't going to happen.

Regards!

...JRF...

whiteknight
Honored Contributor

Re: increase swapspace

Atef,
Steps

1) Create the logical volume for your secondary swap:
#lvcreate -L 2000 /dev/vg00

NOTE: "-L 2000" is the size of desired swap

Use SAM to declare your new secondary swap or use the command line: #swapon /dev/vg00/lvol15

Verify it has been added in "/etc/fstab" when using SAM, or add it manually when using the command line.

Example:
/dev/vg00/lvol15 swap defaults 0 0

WK
Problem never ends, you must know how to fix it
A. Clay Stephenson
Acclaimed Contributor

Re: increase swapspace

Finally after you add swap space you may not be able to fully utilize it until you increase the kernel tunable maxswapchunks (and in rare cases swchunk) which will require a reboot.
If it ain't broke, I can fix that.