- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: SWAP : Question again !!
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
01-29-2003 07:09 PM
01-29-2003 07:09 PM
SWAP : Question again !!
1. What is the best way to configure both swap spaces ( they will mirrored on a diff set of disk on a diff controller) ?
say lvol2 and lv_swap1 as lv names. disk1 has all root volumes. disk2 is relatively free.
2. What priority should I assign and how.
3. Does interleaving of swap require both swaps to be on same size and at same priority ?
TIA
- Q
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2003 07:21 PM
01-29-2003 07:21 PM
Re: SWAP : Question again !!
---->
Create two lvols, second one beinf the secondary swap. Seconday will have entry in /etc/fstab.
assigning same priority
say lvol2 and lv_swap1 as lv names. disk1 has all root volumes. disk2 is relatively free.
---->
assigining same priority will give you better performance. But note that the remaining space on disk2 will be wasted.
2. What priority should I assign and how.
---->
Assign 0 to both, so that they are used simultanously.
for seconday swap put followinf entry in /etc/fstab
/dev/vg00/lv_swap1 ... swap defaults 0 0
3. Does interleaving of swap require both swaps to be on same size and at same priority ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2003 07:28 PM
01-29-2003 07:28 PM
Re: SWAP : Question again !!
Nevertheless, here goes. If this were me, I would 1) use 512MB primary swap on disk1 - we aren't really going to use it. Now make another 7.5GB LVOL on disk1 and your 12GB LVOL on disk2. Assign each of these two swap priority 0 - swapping will interleave between these two until the disk1 LVOL is full and then the remainder will be written to the disk2 LVOL. Finally, primary swap (at priority 1) will be used.
The reason I do it like this (and make primary swap small) is so that when you finally come to your senses and increase memory and reduce swap, the extra swap space can be easily recovered.
A much smarter layout would use disk2 to mirror.
Food for thought, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2003 07:38 PM
01-29-2003 07:38 PM
Re: SWAP : Question again !!
Really a food for thought.
I have lot of things to learn from these big guys.
I love this forum.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2003 07:50 PM
01-29-2003 07:50 PM
Re: SWAP : Question again !!
If your memory utilization is too much the best way is to increase the memory on teh system?
Even the best advice is to have 1 or 1.5 times the amount of RAM for swap and not more than that!!
Are you going to mirror both the hard disks?
The first hard disk contains all the root volumes.
say lvol2 contains the primary swap volume,
then there is no need to mirror the second disk.
Because if you are mirroring the disks then you are also mirroring the 20GB swap which is off waste.
I would suggest to have a primary swap(less) or around 2GB is size on the root disk which is mirrored and place the secondary swap(bigger in size) in a different hard disk.
When you create the primary swap on the root disk it is assigned a default priority of 1.
So when you create the secondary swap make sure that you assign the same priority so that interleaving can happen.
Revert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2003 07:57 PM
01-29-2003 07:57 PM
Re: SWAP : Question again !!
If disk1 has all root volumes, if at all the system swaps, I wouldn't touch it at all.
But if it is inevitable, this is how I configure.
1. Create 1GB of swap on disk1 and make it as primaryswap. Create another swap vol (swap1) with 7 on disk1. Keep the priorty 1.
2. Create 12GB of swap (swap2) on disk2 and add it as secondary swap. Set the priority to 0.
When you swap only disk2 will be accessed. When the swap2 is completely utilized, you will start interleaving on disk1 and that will degrade your performance as expected due to interleaving btw primary swap and swap1.
On the other hand, you have 4 GB of memory and if you swapped 12GB means your system would already be thrashing. So, it does not matter much later with interleaving on disk1 as you would be in a panicky situation already. But if you make the priority of swap1 and swap2 to 0, then the system will start interleaving as soon as swapping occurs. So you will experience unnecessary degradation as it will hit the root disk.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2003 08:14 PM
01-29-2003 08:14 PM
Re: SWAP : Question again !!
Just wanted to warn you on interleaving...
Bottom line is that you don't want root disk to be touched for swapping. It will make the spindle to go crazy as it has to do normal work as well the swapping work that can exponentially degrade the performance.
Interleaving is good if you have two external disks and have a swap area on each. Do not ever interleave a swap area on an external disk with the one on the root disk.
Having a large amount of swap may give you more virtual memory. However, keep an eye on swapping and you should consider increasing the physical memory once the utilization on swap2 reaches 80% (~10GB).
BTW, memory is affordable.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2003 09:09 PM
01-29-2003 09:09 PM
Re: SWAP : Question again !!
Here is what's going to happen if you ever run enough applications to actually use 20G of swap on disk.
Your machine will have ground to an absolute halt and you won't get any meaningful work done.
Up to 16 G of physical memory the rule of thumb is twice physical memory in swap.
I'd like to see details on why primary swap should only be 512 Meg, but if you follow through with your plans, your box will process like this.
V e r y S l o w
P
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
02-04-2003 08:23 PM
02-04-2003 08:23 PM
Re: SWAP : Question again !!
Actually, I agree that there is no need of creating such a large swap space. Since we have 36G x 4 drives on 2 internal UltraLVD controllers reserved only for vg00, we have been asked to provide 20G swap so that we do not to look at this again. What else we do with 72G of mirrored vg00 ?? :) I do not expect swap to be utilized even 20 %.
This is what I have done ->
12G on disk2, with Priority 0.
8G on disk1, with Priority 1.Since we have mirroring, any IO to disks will be balanced ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2003 08:43 PM
02-04-2003 08:43 PM
Re: SWAP : Question again !!
Too much swap.
Make them smaller if you want your system to perform faster than a D class box.
Mirroring doesn't really help with load balancing. The updates eventually have to go down both channels.
Listen to A. Clay. He knows what he's doing.
P
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com