Re: Static Swap

Riley Williams (rhw@BigFoot.Com)
Wed, 14 Apr 1999 00:47:35 +0100 (GMT)


Hi Brandon.

>> There's a common misconception that the swap space one needs is
>> exactly proportional to the amount of RAM one has, and this
>> looks like a classic example of that...

>> Can I state FROM EXPERIENCE that the so-called rule that swap
>> space should be 1.5 times RAM size is BOGUS!!! Some systems need
>> much more, others run happily on much less...

> It's not a rule, it's a general guideline for if you don't know
> how much swap you want.

Even then, it's completely bogus and should be ignored.

A general guideline that's usable is to allocate 8M or the amount
required to top up your RAM to 64M, whichever is greater, rounded up
to the next complete cylinder value ABOVE the relevant figure.

Alternatively, one that says to allocate 124 megs of swap could easily
be honoured on well over 90% of current systems without ever noticing
the reduction in drive data capacity, and will normally produce much
better performance than the 1.5-rule stands a chance of doing. Since
the maximum size of a swap partition is 126 megs, this basically takes
the worst case requirement and assumes such will occur.

Granted, this will normally overstate the amount of swap needed, but
as stated in my original post, too much swap is not a problem whereas
too little really hurts performance...

> It's expected that as people gain experience with setting up and
> running Linux systems, they'll figure out the best swap
> allocation strategy for their systems; the amount of swap
> required depends on both applications and usage patterns.

In my experience, the BIG problem with the current 'rule' as presented
is that people accept it as a hard and fast rule, so never consider
whether their system is under-performing as a result of

> There is no such thing as a hard and fast rule or formula to
> determine swap space.

I'm well aware of that. The problem is that the 'guideline' offered is
plain unrealistic, and if one is going to be offered, then one that at
least stands a chance of being realistic should be offered.

Best wishes from Riley.

+----------------------------------------------------------------------+
| There is something frustrating about the quality and speed of Linux |
| development, ie., the quality is too high and the speed is too high, |
| in other words, I can implement this XXXX feature, but I bet someone |
| else has already done so and is just about to release their patch. |
+----------------------------------------------------------------------+
* ftp://ftp.MemAlpha.cx/pub/rhw/Linux
* http://www.MemAlpha.cx/kernel.versions.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/