Re: How much more memory to relieve swapping?
>>> On Thu, Jun 28, 2007 at 1:36 PM, in message <[EMAIL PROTECTED]>, "Romanowski, John (OFT)" <[EMAIL PROTECTED]> wrote: > Our swap disk is SAN LUNs via 4 FCP chipids. > 5,000 to 25,000 swap page-in's per second sometimes and sometimes that > many page-outs. > It worries the customer > High paging is a relative term with many relatives to consider. Yeah, those numbers are high enough to at least be looking at what's causing them. You'd probably be able to sustain a lot more than that if you were using VDISK for your paging space. Something to think about. If you don't already have a good performance monitor in place for z/VM and Linux, now would be a good time to make the business case for it. Mark Post -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: How much more memory to relieve swapping?
Our swap disk is SAN LUNs via 4 FCP chipids. 5,000 to 25,000 swap page-in's per second sometimes and sometimes that many page-outs. It worries the customer High paging is a relative term with many relatives to consider. This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system. -Original Message- From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of Mark Post Sent: Thursday, June 28, 2007 12:46 PM To: LINUX-390@VM.MARIST.EDU Subject: Re: How much more memory to relieve swapping? >>> On Thu, Jun 28, 2007 at 8:39 AM, in message <[EMAIL PROTECTED]>, "Romanowski, John (OFT)" <[EMAIL PROTECTED]> wrote: > I have some stats on a SLES9 guest's swap page-in and page-out rates but > I don't think those rates alone are enough to tell me how much more > memory I'd need to add to the guest to reduce/eliminate the swapping. > page-in, page-out rates don't tell me whether the guest needs 2 more > pages or 2000 more pages of memory. > > Anyone know what Linux statistics I can use to figure out how much > memory to add to the guest to relieve the swapping? Before we go too far down this road, how many pages per second are you seeing? And what are you using for your page space? VDISK? If so, I wouldn't worry too much about the paging unless it's really high, or if you're running Oracle and the SGA isn't staying resident. Linux paging, in and of itself, isn't a bad thing in a shared environment. Only if it is causing some sort of performance problem. Mark Post -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: How much more memory to relieve swapping?
>>> On Thu, Jun 28, 2007 at 8:39 AM, in message <[EMAIL PROTECTED]>, "Romanowski, John (OFT)" <[EMAIL PROTECTED]> wrote: > I have some stats on a SLES9 guest's swap page-in and page-out rates but > I don't think those rates alone are enough to tell me how much more > memory I'd need to add to the guest to reduce/eliminate the swapping. > page-in, page-out rates don't tell me whether the guest needs 2 more > pages or 2000 more pages of memory. > > Anyone know what Linux statistics I can use to figure out how much > memory to add to the guest to relieve the swapping? Before we go too far down this road, how many pages per second are you seeing? And what are you using for your page space? VDISK? If so, I wouldn't worry too much about the paging unless it's really high, or if you're running Oracle and the SGA isn't staying resident. Linux paging, in and of itself, isn't a bad thing in a shared environment. Only if it is causing some sort of performance problem. Mark Post -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: How much more memory to relieve swapping?
On Thu, 2007-06-28 at 15:24 +0200, Rob van der Heij wrote: > A higher value of swappiness means that when Linux memory management > needs some free memory, it is more willing to swap out a process than > to purge data in cache. The definition of swappiness is murky. The relevant code snippets and comments from the source: /* * `distress' is a measure of how much trouble we're having * reclaiming pages. 0 -> no problems. 100 -> great trouble. */ distress = 100 >> min(zone->prev_priority, priority); /* * The point of this algorithm is to decide when to start * reclaiming mapped memory instead of just pagecache. Work out * how much memory * is mapped. */ mapped_ratio = ((global_page_state(NR_FILE_MAPPED) + global_page_state(NR_ANON_PAGES)) * 100) / vm_total_pages; ... /* * Now decide how much we really want to unmap some pages. The * mapped ratio is downgraded - just because there's a lot of * mapped memory doesn't necessarily mean that page reclaim * isn't succeeding. * * The distress ratio is important - we don't want to start * going oom. * * A 100% value of vm_swappiness overrides this algorithm * altogether. */ swap_tendency = mapped_ratio / 2 + distress + sc->swappiness; ... /* * Now use this metric to decide whether to start moving mapped * memory onto the inactive list. */ if (swap_tendency >= 100) force_reclaim_mapped: reclaim_mapped = 1; If the distress -- which is defined in terms of zone priorities -- reaches a certain limit, the system starts to swap. try_to_free_pages repeatedly scans the active/inactive list with a priority value that starts at 12. The priority is decreased from run to run if not enough pages can be freed. Black magic. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: How much more memory to relieve swapping?
On 6/28/07, Romanowski, John (OFT) <[EMAIL PROTECTED]> wrote: If I set swappiness=0 what does Linux do instead of swapping? What does swappiness=100 mean? Barton says short answers are the best, so at the risk of being too brief... A higher value of swappiness means that when Linux memory management needs some free memory, it is more willing to swap out a process than to purge data in cache. The idea is that you may not want a single process to wipe out all cached data. On the other hand, you would not want to retain a lot of data in cache if that means much swapping. Most scenarios that I have seen seem to apply to desktop systems. I have not done measurements on systems where swappiness was deliberately set other than default. Rob -- Rob van der Heij Velocity Software, Inc http://velocitysoftware.com/ -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: How much more memory to relieve swapping?
Romanowski, John (OFT) wrote: If I set swappiness=0 what does Linux do instead of swapping? What does swappiness=100 mean? This does not control the actual physical rate of swapping, it controls how aggressively Linux will seek out pages for swapping in order to maintain free storage frames. Therefore swappiness=0 means that Linux will try to leave as many pages in storage as possible, and only steal pages as required. You never get something for nothing ;-) It is however worth experimenting with, and there have been a number of discussions with many opinions. Use Google to search for ideas ;-) Mark -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: How much more memory to relieve swapping?
Romanowski, John (OFT) wrote: I have some stats on a SLES9 guest's swap page-in and page-out rates but I don't think those rates alone are enough to tell me how much more memory I'd need to add to the guest to reduce/eliminate the swapping. page-in, page-out rates don't tell me whether the guest needs 2 more pages or 2000 more pages of memory. Anyone know what Linux statistics I can use to figure out how much memory to add to the guest to relieve the swapping? It's not simple. On Intel hardware, I find that if one is using much more swap than one has in real memory, then one has a problem. But then my workload is mostly desktop stuff, and the Mozilla clan's a real pig. OTOH I used to try to rsync a Linux filesystem as a collection of files over the Internet and I found myself using several times real memory and no apparent problem with swapping. (I'm sure there would have been if anything else had been making demands). -- Cheers John -- spambait [EMAIL PROTECTED] [EMAIL PROTECTED] Please do not reply off-list -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: How much more memory to relieve swapping?
On 6/28/07, Romanowski, John (OFT) <[EMAIL PROTECTED]> wrote: I have some stats on a SLES9 guest's swap page-in and page-out rates but I don't think those rates alone are enough to tell me how much more memory I'd need to add to the guest to reduce/eliminate the swapping. page-in, page-out rates don't tell me whether the guest needs 2 more pages or 2000 more pages of memory. Anyone know what Linux statistics I can use to figure out how much memory to add to the guest to relieve the swapping? I don't think you can predict the workload behavior. The problem is that you don't really know what is being swapped out and back in. You also want to know how much is in use on the swap disk. One would expect that if you had that amount more memory, you would not have swapped and your rates would have been zero. But hysteresis in Linux memory management makes it a bit harder than this. If you have a large swap-out rate and low swap-in rate, your system is still getting rid of old stuff and makes new data. When your swap-in rate is consistently higher than the swap-out, your system may be thrashing and may be just too small for the workload. Once the average swap-out and swap-in are about the same, you have a stable situation to measure. Rob -- Rob van der Heij Velocity Software, Inc http://velocitysoftware.com/ -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: How much more memory to relieve swapping?
If I set swappiness=0 what does Linux do instead of swapping? What does swappiness=100 mean? This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system. -Original Message- From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of Mark Perry Sent: Thursday, June 28, 2007 8:50 AM To: LINUX-390@VM.MARIST.EDU Subject: Re: How much more memory to relieve swapping? Romanowski, John (OFT) wrote: > I have some stats on a SLES9 guest's swap page-in and page-out rates but > I don't think those rates alone are enough to tell me how much more > memory I'd need to add to the guest to reduce/eliminate the swapping. > page-in, page-out rates don't tell me whether the guest needs 2 more > pages or 2000 more pages of memory. > > Anyone know what Linux statistics I can use to figure out how much > memory to add to the guest to relieve the swapping? > Hi John, you also have some control over how hard Linux tries to swap via: /proc/sys/vm/swappiness 0 is don't try hard to swap 100 is try very hard to swap There are a number of other "controls" in the vm subdirectory that can be tweaked. Mark -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: How much more memory to relieve swapping?
Romanowski, John (OFT) wrote: I have some stats on a SLES9 guest's swap page-in and page-out rates but I don't think those rates alone are enough to tell me how much more memory I'd need to add to the guest to reduce/eliminate the swapping. page-in, page-out rates don't tell me whether the guest needs 2 more pages or 2000 more pages of memory. Anyone know what Linux statistics I can use to figure out how much memory to add to the guest to relieve the swapping? Hi John, you also have some control over how hard Linux tries to swap via: /proc/sys/vm/swappiness 0 is don't try hard to swap 100 is try very hard to swap There are a number of other "controls" in the vm subdirectory that can be tweaked. Mark -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
How much more memory to relieve swapping?
I have some stats on a SLES9 guest's swap page-in and page-out rates but I don't think those rates alone are enough to tell me how much more memory I'd need to add to the guest to reduce/eliminate the swapping. page-in, page-out rates don't tell me whether the guest needs 2 more pages or 2000 more pages of memory. Anyone know what Linux statistics I can use to figure out how much memory to add to the guest to relieve the swapping? John Romanowski z/VM - zLinux Support NYS Office for Technology (518)485-9555 This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390