- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Device swap priority
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
08-03-2009 08:29 AM
08-03-2009 08:29 AM
My question is about priority. Can I set the priority of the secondary swap device (/dev/vg01/lvol1) the same as the primary swap device (/dev/vg00/lvol2)??
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2009 08:34 AM
08-03-2009 08:34 AM
Re: Device swap priority
The same priority help you to improve the performance by enabling interleaving.
If the same priority is given it is recommended to have same size and same speed of the disk and ofcourse in different disk which give you better performance with swap interleaving.
Regards,
Sooraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2009 08:39 AM
08-03-2009 08:39 AM
Re: Device swap priority
While this is true, it is also some irrelevant.
To paraphrase Clay Stephenson.....Worrying about swap priority is like rearranging the deck chairs on the Titanic.
IF you actually start paging out to any significant extent your performance will be so bad that whether your swap devices are interleaved or not will be irrelevant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2009 08:40 AM
08-03-2009 08:40 AM
Re: Device swap priority
"some" should be "somewhat" in that sentence above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2009 08:44 AM
08-03-2009 08:44 AM
Solution> Can I set the priority of the secondary swap device (/dev/vg01/lvol1) the same as the primary swap device (/dev/vg00/lvol2)??
You can set it equal, larger in value (a lower priority) or smaller (a higher priority).
If you put the secondary swap space on vg00, then I would set its priority to a different value than that of the primary. If you ever do I/O then you don't want disk head movement as interleaving occurs between equally prioritized devices.
If you put the secondary swap space on a volume other than vg00, I prefer to make it a lower priority (and therefore preferentially used) device. I like to keep vg00 I/O to a minimum.
In all cases, you want to have sufficient physical memory and appropriate workloads so that you never swap. Of course, you will see swap utilization for process reservation, but you don't want to actually do I/O. You can monitor swapping (paging) with 'vmstat'. Look at the 'page-out or 'po' column as your indicator. Values in the double-digits indicate worsening degradation.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2009 10:57 AM
08-03-2009 10:57 AM
Re: Device swap priority
The main purpose of adding a swap device is to make swap size same as physical memory installed on the box. Total RAM is 8Gb while primary swap is 4Gb. So I was thinking of adding another swap device so that more processes can be started up.
This fact comes from HP's techdoc I read a while back about how the kernel reserves memory for programs before running them. That's why sometimes when I try to start a process like glance it tells me that it "can't allocate sufficient memory" and other times it is just fine.
I agree with the fact that adding swap is like re-arranging chairs on the Titanic because pageouts in never a good thing and indicates memory pressure. But in my case there is no pageout activity though swap utilization is ~95%. I also have pseudo-swap turned on and even its utilization at the time was ~95%.
Is my understanding correct or I am totally wrong? Please help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2009 11:05 AM
08-03-2009 11:05 AM
Re: Device swap priority
Set your new swap to the same priority.
The priority is mute if the system never deactivates/pages anything.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2009 11:07 AM
08-03-2009 11:07 AM
Re: Device swap priority
>>is to make swap size same as physical
>>memory installed on the box. Total RAM is
>>8Gb while primary swap is 4Gb. So I was
>>thinking of adding another swap device so
>>that more processes can be started up.
>>I try to start a process like glance it
>>tells me that it "can't allocate
>>sufficient memory" and other times it is
>>just fine.
Exactly! That makes perfect sense.
>>Is my understanding correct or I am
>>totally wrong? Please help.
Your understanding is perfectly accurate and your actions make sense.
I based my answer above on the information given in your initial question, where you did not mention your inability to start processes or the reason you were looking to add swap. All you asked about was swap priority.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2009 11:39 AM
08-03-2009 11:39 AM
Re: Device swap priority
Feels good to know that HP's techdoc made sense to me because most of the time I feel lost with all that heavy duty technical stuff.
@Patrick: Sorry I wasn't clear about the root cause of the high swap utilization.
I still have some small doubts. If there are no pageouts going on why is swap utilization so high at times while at other times it is so low? Is it because of too many runnable processes?
I looked at the system a few minutes ago and it seemed pretty calm i.e. primary swap was at ~10% while pseudo-swap (memory) was at ~20%.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2009 11:49 AM
08-03-2009 11:49 AM
Re: Device swap priority
>>swap utilization so high at times while at
>>other times it is so low? Is it because of
>>too many runnable processes?
I think you are confusing swap "utilization" with swap "allocation". As long as your device swap lines show 0% used, then you are not using swap.
However, processes are ALWAYS allocating swap "just in case." If you are looking at the reserve and memory lines of 'swapinfo -tam' then you are seeing what has been allocated for use by processes. This does NOT indicate how much has actually been used. It indicates how much "could be" used.
If you post your 'swapinfo -tam' output we may be able to alleviate some of your fears and clear up any doubts you have.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2009 11:50 AM
08-03-2009 11:50 AM
Re: Device swap priority
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2009 11:52 AM
08-03-2009 11:52 AM
Re: Device swap priority
swapinfo ?
glance ?
the allocaton of swapspace will rise as memory utilization rises.. until you start seeing deactivations or used% depending on your tool..
With 8GB of physical ram I would at a minimum configure 8GB of disk swap, maybe 10GB. This allows you to use all 8GB of physical ram.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2009 11:53 AM
08-03-2009 11:53 AM
Re: Device swap priority
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2009 01:16 PM
08-03-2009 01:16 PM
Re: Device swap priority
I was looking at the output of glance and swapinfo. The problem has gone away for now and the system is pretty calm. I wasnt looking at the swapinfo "reserve" line because I learnt not to from these forums. Here is the current swapinfo snapshot.
# swapinfo -mat
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 276 3820 7% (~95% w/ problems) 0 - 1 /dev/vg00/lvol2
reserve - 3813 -3813
memory 4786 2046 2740 43% (~93% w/ problems)
total 8882 6135 2747 69% - 0 -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2009 01:22 PM
08-03-2009 01:22 PM
Re: Device swap priority
From your and Patrick's post I take it that there are subtleties in how swap space is viewed ie "reservation" as opposed to "allocation".
As there wasn't any pageout activity it can be said that swap space was only being "reserved" but not "allocated" for the actual movement of pages out of RAM due to memory pressure. Is that feasible to say?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2009 01:34 PM
08-03-2009 01:34 PM
Re: Device swap priority
http://www.docs.hp.com/en/5965-4641/5965-4641.pdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2009 10:34 AM
08-04-2009 10:34 AM
Re: Device swap priority
Thanks for the doc. It is a really good one. It will take me some time to go thru it but it looks like a perfect fit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2009 10:35 AM
08-04-2009 10:35 AM