[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT (slightly) swap limits



On Thu, Apr 24, 2008 at 05:16:56PM -0400, Damon L. Chesser wrote:
> Patrick Ouellette wrote:
>> On Thu, Apr 24, 2008 at 04:45:05PM -0400, Damon L. Chesser wrote:
>>   
>>> Being in an interview loop looking for employment, I find I am asked  
>>> questions I never considered, for example:  How much is enough swap?
>>>
>>>     
>>
>> Rephrase the question.  Ask what the intended use of the machine is,
>> what response times the users expect, how much real RAM is there, and
>> what applications/services will run off the machine.
>>
>> Then tell the interviewer how each parameter you've asked about would
>> influence your decision on how much swap was enough.
>>
>> How much is enough?  As much as the system needs to run and not kill  
>> processes due to lack of memory (real + swap).
>>
>> I've run machines with 1Gig or more RAM with NO SWAP.  I've also run
>> machines with 4Gig of RAM and 16Gig of swap (BIG datasets).
>>
>> Pat
>>   
> Well,
>
> I tend to agree with you, however, I am being sucked dry of my Linux  
> knowledge (the purpose of the interview, find the point of breakdown to  
> determine the extent of the knowledge/skill).  And much to my surprise I  
> just found this:
>
> "At a bare minimum, you need an appropriately-sized root partition, and
> a swap partition equal to twice the amount of RAM"
>
> page 59, from a questionable source:  Installation Guide of RHEL5.

interestingly RHEL4 at 2.6 kernel distro still also made swap files of
2G max and used multiples of that.  Since 2.6 this hasn't been
necessary.

Just because RHEL does it that way doesn't make it right

Patrick I believe has the better approach - what are you going to use
the box for and what sort of response do you want, although I have to
diss agree on the need for large swap space for a database, DB are
engineered to use all the space that are told to get hold of and have
their own caching.  Why interfere with it by pretending you have more
memory than you do.  You could end up hitting swap because the DB cache
has grown.



>
> and on page 62, they further detail it:
>
> "Swap should equal 2x physical RAM for up to 2 GB of physical RAM, and  
> then an additional
> 1x physical RAM for any amount above 2 GB, but never less than 32 MB.
> So, if:
> M = Amount of RAM in GB, and S = Amount of swap in GB, then
> If M < 2
> S = M *2
> Else
> S = M + 2
> Using this formula, a system with 2 GB of physical RAM would have 4 GB  
> of swap, while one
> with 3 GB of physical RAM would have 5 GB of swap. Creating a large swap  
> space partition
> can be especially helpful if you plan to upgrade your RAM at a later time.
> For systems with really large amounts of RAM (more than 32 GB) you can  
> likely get away
> with a smaller swap partition (around 1x, or less, of physical RAM)."
>
> That is RHEL's take on the issue.  Still looking for other sources.   
> Interesting, I think.
>
>
> -- 
> Damon L. Chesser
> damon@damtek.com
> http://www.linkedin.com/in/dchesser
>
>
> -- 
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a 
> subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>

-- 
"We want to develop defenses that are capable of defending ourselves and defenses capable of defending others."

	- George W. Bush
03/29/2001
Washington, DC
White House press conference,

Attachment: signature.asc
Description: Digital signature


Reply to: