- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Increasing SWAP
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 03:28 AM
10-29-2003 03:28 AM
Were running an IA64 on HPUX B.11.22 and I need to increase my swap file as I've seen it grow to 98% full. How can I do this and still have the swap file contiguious.
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 03:30 AM
10-29-2003 03:30 AM
Re: Increasing SWAP
The better way would be to create another LV to use as swap space.
However, if you are using that much swap then you really need to add more RAM instead of adding more swap. If you truly are paging out, then I'm your machine is performing rather poorly.
If you could attach your 'swapinfo -tam' output so we can verify you usage that would be great.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 03:31 AM
10-29-2003 03:31 AM
Re: Increasing SWAP
Basically you can't extend the current swap. You'll never be able to keep it contiguous.
But what you CAN do is add secondary swap on another disk device & that'll work just fine.
You'll need to check your maxswapchunks kernel parm - it'll probably have to be increased to accomodate the extra swap. This will require a reboot.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 03:33 AM
10-29-2003 03:33 AM
Re: Increasing SWAP
Here is how if you want to:
Adding secondary swap:
USING LVM:
1.) pvcreate /dev/rdsk/cXtXdX (The disk that will be used for swap)
2.) vgcreate /dev/vgXX /dev/dsk/cXtXdX (Creating a volume group)
or vgextend /dev/vg00 /dev/dsk/cXtXdX (to add the disk)
3.) lvcreate -L (size in mb) -C y -r n /dev/vgXX (Creating a logical
volume for swap)
4.) edit the fstab file ..ie /dev/vgXX/lvolX ... swap pri=1 0
5.) swapon -a
6.) swapinfo -tam (should show new swap)
To remove swap
1.) edit the fstab file -> remove the swap line
2.) reboot the system
If you want this new swap to be dump as well, it must be in vg00 and then
run the command lvlnboot -d /dev/vg00/lvolX
To check it -> lvlnboot -v
USING WHOLE DISK PARTITION:
1.) edit the fstab file ..ie /dev/dsk/cXtXdX ... swap pri=1 0
2.) swapon -a
3.) swapinfo -tam (should show new swap)
Hope this helps
-Brian.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 03:33 AM
10-29-2003 03:33 AM
Re: Increasing SWAP
Just create a new swap partition and activate it, easiest way to do this is with SAM -> Disks and Filesystems -> Swap.
HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 03:34 AM
10-29-2003 03:34 AM
Re: Increasing SWAP
Here is my 'swapinfo -tam'
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 1226 2870 30% 0 - 1 /dev/vg00/lvol2
reserve - 2310 -2310
memory 1463 448 1015 31%
total 5559 3984 1575 72% - 0 -
Right now it's at about 30% but I've seen it increase to as high 98%, unfortunatley I can't recall what was happening at that time to increase swap to that point.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 03:39 AM
10-29-2003 03:39 AM
Re: Increasing SWAP
You, and your users, will probably see a performance increase when you do, since you won't swapping anymore.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 03:45 AM
10-29-2003 03:45 AM
Re: Increasing SWAP
Barry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 03:47 AM
10-29-2003 03:47 AM
SolutionThe general strategy now is the A. Clay Stephenson plan which involes a smaller primary swap and a larger secondary that only gets used when loads get high.
As Patrick notes, swap is no substitute for adequate memory. If you need to increase swap beyond twice memory, performance will suffer and thats a good indicator its time to get your hands on some RAM.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 03:51 AM
10-29-2003 03:51 AM
Re: Increasing SWAP
If you add memory, that will give you more room for processes to run, without other processes having to be paged-out to disk first, thus making things run a whole lot faster.
Now, if you add more memory, you don't necessarily need to add more swap space. If you set the kernel parameter swapmem_on to 1 then HP-UX will use 75% of your RAM as pseudo-swap, thus allowing processes to run and reserve their little piece of swap space without actually having to have a 1:1 ratio of available swap to RAM. Having swapmem_on set to 1 will not impact the amount of RAM you have available for processes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 03:53 AM
10-29-2003 03:53 AM
Re: Increasing SWAP
However, you want swap at least as large as ram so that you can capture mem dumps, if necessary.
In that ram is 1000 times as fast as disk access, it you're really paging out that much, more ram is the performance answer.
also, if you ever really do run out of swap, things canget ugly ( swap mem off protects against this, but if on, some things just wont get done., = ugly)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 04:00 AM
10-29-2003 04:00 AM
Re: Increasing SWAP
http://docs.hp.com/cgi-bin/otsearch/getfile?id=/hpux/onlinedocs/os/11.0/tuningwp.html&searchterms=Ciullo%7cStephen&queryid=20031029-095623
By the way, if you have a support contract, I HIGHLY recommends having him check out your system. You send him a few files; he sends you a report and BAMN!! I thought our systems were tuned pretty well; the things he recommended boosted our performance by over 50% on some of our machines.
Hope this helps!
-Brian.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 04:02 AM
10-29-2003 04:02 AM
Re: Increasing SWAP
B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 04:05 AM
10-29-2003 04:05 AM
Re: Increasing SWAP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 04:10 AM
10-29-2003 04:10 AM
Re: Increasing SWAP
If the budget it tight, have a look at Kingston memory. It works just fine in HP machines and has a lifetime warranty.
http://www.kingston.com
Other companies also do 3rd party RAM for HP machines. Crucial and Dataram come to mind.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 04:28 AM
10-29-2003 04:28 AM
Re: Increasing SWAP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 04:36 AM
10-29-2003 04:36 AM
Re: Increasing SWAP
You have to explain to mgmnt that if that swap usage ever reaches 100%, then the game's over & everything will grind to a halt.
They basically have ONLY two choices:
1) Increase RAM
2) Decrease RAM demand
What apps are you running? 2GB for anything serious is woefully short. If they can decrease the app's RAM demand - then you can limp along w/o adding RAM. But they *must* understand that when you're paging out the performance hit can be in the tens of thousands percent.
My 2 cents,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 09:43 AM
10-29-2003 09:43 AM
Re: Increasing SWAP
1) Put "#" in front of swap area in /etc/fstab file
3) reboot the system
4) remove swap file system
# lvremove /dev/vg00/lvol2
5) re-create swap file system
# lvcreate -L xxxx /dev/vg00
6) activate swap file system
# swapon /dev/vg00/lvol2
7) add swap file system into /etc/fstab
For the best performance, you had better create device swap with one physical disk.
1) Device Swap:
a. A disk area or logical volume that is used exclusively for swap.
b. Device swap is faster than file system swap.
c. When using the whole disk approach, you can either use an entire disk for swap, or reserve space at the end of the disk after the file system by using the â R option of newfs. For example, the following command creates a file system on a disk and reserves 200 MB for swap:
# newfs â R 200 /dev/rdsk/c0t2d0
When using LVM you create a separate logical volume for device swap. The following is an example of an lvcreate command used to create 200 MB swap logical volume:
# lvcreate â L 16 â n myswap /dev/vg01
1)Swap on a logical volume (device swap)
# lvcreate â L 12 â n myswap vg00
#swapon /dev/vg01/myswap
2)Swap on a whole disk ( whole disk swap)
# swapon /dev/dsk/c0t2d0
3)Swap on a file system
# swapon -p 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 12:20 PM
10-29-2003 12:20 PM
Re: Increasing SWAP
For example
Are you running ORACLE?
Look at your at your SGA area. you might be able to reduce it. I have seen some oracle parms set so hight that the cache hit rates were wonderful. The benifit was lost because the OS was paging.
Check your tunable parameters to see if you can free up memory.
Consider setting ulimits. See if you have a program that is "leaking" memory
Find out who your bad boys are
ps -fel (check the SZ column)
then see what can be done to tune them.
Regrading no money in the budget. If you don't fix this problem your company will loose money becuase of downtime and lost productivity.
Good Luck
Rory