- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: More 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
04-20-2004 07:34 AM
04-20-2004 07:34 AM
swapmem_on kernel parameter is 1 (on)
I always see error messages that swap is not equal to ram. But I never see swap to disk. It will first deactivate processes but never swap to disk.
Why should I look for more swap space if it never gets used ?
The Oracle system has 15 GB Ram 1GB swap
What advantage would it have if I alocated 15GB of swap ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 07:38 AM
04-20-2004 07:38 AM
Re: More SWAP
Do the decent thing and increase your swap.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 07:42 AM
04-20-2004 07:42 AM
Re: More SWAP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 07:46 AM
04-20-2004 07:46 AM
Re: More SWAP
I know some other unixes e.g. Linux do not pre-allocate but they have other strategies for dealing with running out of virtual memory. What does a non-preallocating HPUX box do? Does it just stop, or worse, does some processes keel over and die corrupting stuff?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 07:46 AM
04-20-2004 07:46 AM
Re: More SWAP
Because many people use swap as dump space (I do not; they really have nothing to do with each other), you need to think about how much dump space you need. Typically about 25% of total memory is sufficient and it shouldn't be mirrored. I assure you that HP support does not want a 15GB dump and that it why the low 25% of address space is usually plenty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 07:47 AM
04-20-2004 07:47 AM
Re: More SWAP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 07:50 AM
04-20-2004 07:50 AM
Re: More SWAP
Regarding the other question as to "what happens when pseudo-swap runs out".. there's no difference between that and running out of disk swap reservation. When swap reservation fails, the allocation causing the reservation gets failed. If the app can handle that, fine. If the app is being exec'ed, it will fail the exec. If the app was growing something that had Lazy Swap allocation set up, it usually gets killed (the price you pay for using Lazy swap allocation). Nothing should fall over and be corrupted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 07:53 AM
04-20-2004 07:53 AM
Re: More SWAP
Sorry to hijack this thread but it is still related I guess.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 08:32 AM
04-20-2004 08:32 AM
Re: More SWAP
If then, you don't reserve swap when a process starts, you are running the risk of running out of swap, which can sometimes be ugly. It's a risk.
On the other hand, if you've installed massive amounts of ram, (our users won't tolorate the performance hit if we ever swap) and are sure you will never swap, then why waste the disk space. We do have some systems with filesystem swap configured as some limited protection.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 09:04 AM
04-20-2004 09:04 AM
Re: More SWAP
The long and the short of it is that there is *no* difference in the reservation code until the very low levels based on the type of swap being reserved. The RAM being used for pseudo-swap is simply added into the total swap available figure and treated just like anything else. If we need to kick any pages out, the kernel can tell if the backing store is "real" or not and act accordingly. That's why I think it isn't precisely correct to say that reservation is disabled.
This is different from Lazy Swap (and doesn't run the risk of swap failure) because when the physical memory to handle any process allocation is reserved just like disk swap.. no one can steal it away. Effectively, you have physical RAM allocated to you -- you just don't know which pages they are yet (or have translations, etc.)
So there are worst case scenarios where you could have extremely large virtual allocations on a machine with little or no physical swap, which are representing very sparse physical usages (i.e. you mmap() MAP_ANONYMOUS for 4Gb and only use a page... and the whole box is like that)... which would result in a lot of RAM being underutilized (since it would be reserved for these beasts). Usage patterns such as this really should be using enough physical swap so that RAM goes to actual physical needs.
And now I'm rambling... sorry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 12:44 PM
04-20-2004 12:44 PM
Re: More SWAP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2004 01:30 AM
04-21-2004 01:30 AM
Re: More SWAP
See if I get this right.
My 3GB system with 1GB swap and
swapmem_on kernel parameter turned on
I am using .75 x 3 = 2.25 + 1GB swap = 3.25
so I should be OK ?
Would it run better with swapmem off
and add 5GB of secondary swap ?
What do I watch to indicate I am into swap condition ?
Glance KB Paged Out ?
Deactivations ?
I apriciate all the answwers but am still confused.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2004 02:40 AM
04-21-2004 02:40 AM
SolutionThere is no question that allocating at least as much swap as memory is the safer choice and in those circumstances there is no need run pseudoswap at all --- its just a tiny bit of kernel overhead that is not needed. By the time you start seeing deactivations, you have lost the battle so the metric to watch is the pageout rate. Some pageouts will occur even without swapping if memory mapped files are in use.
The ideal pageout rate is 0; single-digits are fine; when rates get moderately above that its time to add more memory or reduce the load --- especially if this occurs for sustained periods of time.
The most important thing that you need to keep in mind that when the pageout rate becomes high, performance is going to be so bad that whether or not you can run still more processes is unimportant. You really need nothing more sophisticated than vmstat. I really consider the 'po' column the ONLY metric of interest in vmstat's output.
The whole purpose of pseudoswap (and remember, pseudoswap doesn't 'exist' anywhere; it's just kernel bookkeeping) is to allow processes to run without requiring that there be dedicated "real" swapspace. For machines with "lots" of memory this makes sense. Why buy a bunch of disks that will never be used -- especially when you should buy twice that much (mirroring)?
After going through all this, I still fall back on my method that has served me well.
Allocate a small amount of primary swap -- you must have some. By small (even with boxes with "lots" of memory), I mean something in the 512MB to 1GB range. Monitot your system (vmstat is fine) and add additional swap as needed. It's so easy to add additional swap (especially if you deliberately leave unallocated space in LVM) that it's really not worth worrying about. As long as you have 0.25MEM as swapspace and swapmem_on=1 set, you will be able to run just as many processes "well" (ie without paging out) as the person who allocates 1XRAM as swapspace.
There are, of course, instances where it does make sense to have much more swap than actual memory and tolerate swapping. For example, consider a system which might have hundreds (or thousands) of users who run essentially the same interactive program -- maybe a search engine or documentation server. The total number of active users at any one time is small although the total number of users might be very large. In this case, having enough memory so that pageouts never occur would be expensive and wasteful. Here the pageout rate would probably be in the single digits and so a bunch of swapspace makes sense.