On Mon, Jan 29, 2001 at 02:57:44PM -0800, Alan Olsen wrote:
> 
> What is the recommended amount of swap with the 2.4.x kernels?

AFAIK, swap requirements for applications running under a 2.4 kernel have not 
changed significantly from 2.2 kernels (please anyone correct me if I'm wrong),
so the basic answer is:  About as much as you needed with for a 2.2 kernel.

> The standard rule is usually memory x 2.  (But that is more a Solaris
> superstition than anything else.)

This always struck me as the most stupid rule of thumb I'd ever heard of.  
With this metric, systems which precisely need swap the most (low-RAM systems) 
get the least of it, and those that need it the least (those with gigs of RAM) 
get tons of swap they don't need.  I don't know how this keeps perpetuating, 
as it should be plainly brain damaged to anybody who thinks about it for a 
couple of seconds, but somehow it does.

My general recommendation is:
1) Take the best guess you can at how much total memory you're ever going to 
   need at one time.  This can vary with the type of tasks you're doing 
   (server/desktop/image-editing/etc), the software programs you're using, and 
   so on.  There is no easy way to figure this out, but I would recommend that 
   if you come up with anything less than 128MB, you're probably being too 
   optimistic.
2) Subtract the amount of RAM you have (believe it or not, the more RAM you 
   have, the less swap you need.  Imagine that).
3) Round up to a nice breaking point (multiples of 64MB are nice and are easy 
   to remember), just for convenience.
4) Add a little bit of extra just in case (it's better to have too much than 
   too little, particularly since disk is cheap).  I usually add somewhere 
   around 64MB.

For most people, for most systems, this comes out somewhere between 128MB and 
256MB of swap needed (in some cases you may need 512MB or more, but if you've 
got those sorts of memory demands you may want to carefully consider whether 
more RAM wouldn't be a good investment).  If in doubt, go for the larger 
number.  After all, with an 8.1GB drive, how much are you going to miss a puny 
0.25GB (256MB) chunk of it?

-alex
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to