<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">The 2x rule for swap was a rule of thumb. Considering older linux platforms, it was an excellent rule. Actually, swap sizes should be based on the number of concurrent (but potentially sleeping) processes that are in execution. With high speed computers, I believe that it is possible to even have a ratio of 10 to 1 or 50 to 1 (swapsize to memory size).  <br><br>Keep on loading tasks that generate a wait, and check it out.  Also, respond to the tasks in any random order.  The system should unwind--- so to speak.<br><br>Les<br><br>--- On <b>Wed, 1/21/09, Leslie Satenstein <i><lsatenstein@yahoo.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">From: Leslie Satenstein <lsatenstein@yahoo.com><br>Subject: Re: Ideal Swap Partition Size<br>To: "Community assistance,
 encouragement, and advice for using Fedora." <fedora-list@redhat.com><br>Date: Wednesday, January 21, 2009, 8:49 PM<br><br><div id="yiv1455496663"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;" valign="top">Regarding swap files and intel architectures.  I believe swapping is not by pages, but by segment sizes, which is gruesome, because of performance.  <br><br>On other architectures, swap is actually a paging file and only the needed pages are swapped out.<br><br>Even with a swap out, the program could still be in memory as the space was not reclaimed and thus, the program should not have to be swapped back in to be used. <br><br>--- On <b>Tue, 1/20/09, Gordon Messmer <i><yinyang@eburg.com></i></b>
 wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">From: Gordon Messmer <yinyang@eburg.com><br>Subject: Re: Ideal Swap Partition Size<br>To: "Community assistance, encouragement, and advice for using Fedora." <fedora-list@redhat.com><br>Date: Tuesday, January 20, 2009, 11:06
 PM<br><br><pre>Rick Stevens wrote:<br>> <br>> Reserving a swap area and its size is rather dependent on what the<br>> machine is doing.  We have database servers that, on occasion, get<br>> hammered and revert to using swap for a brief time.  We use a 2X swap<br>> size and we've come close to using it all, so it's still valid. <br>You<br>> will have to watch it---as soon as you start really whacking swap,<br>> system performance is going to start suffering quite badly.<br><br>It's also important to bear in mind that under the standard configuration,<br>you must have at least as much "free" memory as the largest<br>application in your server, or else that application won't be able to call<br>external programs.<br><br>Let's imagine that you have a server with 2GB of RAM, and just 512MB of<br>swap (maybe based on the idea that swapping will cause the system to behave<br>badly).  Let's also imagine that you've tuned your SQL server
 to<br> keep as<br>much data in memory as possible, so it's 1.5GB resident.  Now, if you SQL<br>server has helper applications that it wants to call, it has to fork() and then<br>exec() to start them.  When it does a fork(), the system doesn't actually<br>copy all of its pages for the new process, but it does require that the memory<br>be available (the extent to which that is true depends on your overcommit<br>settings).  However, since you don't have 1.5GB of memory available, the<br>fork() will probably fail, and the SQL server process can't execute its<br>helper script.<br><br>This situation would be much harder to diagnose if you had 1GB of swap and your<br>SQL server were something like 1.3 GB.  In that case, it might sometimes work<br>and sometimes fail depending on how many other processes were using memory.<br><br>So, even if you expect to never *use* swap space, you should have at least as<br>much swap as physical RAM.<br><br>I thought I'd read
 once<br> that using twice as much swap as physical RAM<br>actually allowed the system to use a linear map of swap pages to virtual address<br>space, so that it didn't have to search for free pages of swap when it paged<br>something out.  The result was a faster swap manager, but I'm not sure if<br>that's actually the case.  I haven't been able to find documentation to<br>back it up.  Anyone know whether or not that's the case?<br><br>-- fedora-list mailing list<br>fedora-list@redhat.com<br>To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list<br>Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines<br></pre></blockquote></td></tr></tbody></table></div><pre>-- <br>fedora-list mailing list<br>fedora-list@redhat.com<br>To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list<br>Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines</pre></blockquote></td></tr></table>