> Running Linux, Pg 52 -  A single swap file or partition may be up to 128MB
> (more with the latest kernels).*  If you wish to use more then 128MB of swap
> (hardly ever necessary), you can create multiple swap partitions or files - up

Beware the rate at which numbers become outdated in books :-)  Take a look
at page 37 of the same book.  It says "You should have at the very least
8mb of RAM; however it's strongly suggested that you have at least
16mb."  In a later paragraph it goes on to say "Amounts of RAM greater
than 64mb need a boot-time parameter."

In short, the numbers and constraints amay not apply to v2.2 of the kernel
and may not reflect the growing demands of X/Gnome/KDE and large graphical
apps for memory space.  I don't know about you but I wouldn't think if
trying to run a typical Linux workstation on a 8-16mb machine.  

> to 16 in all.  For example, if you need 256MB of swap, you can create two
> 128MB swap partitions.

Obviously we know that this is no longer true as LM defaults to 250mb on
128mb machines.  
 
> LPI Prep Kit General Linux I, Pg 48 - Your swap partition should be twice the
> amount of physical RAM installed on your system.  The maximum size of a swap

This I don't understand.  In fact, the more memory I put in a machine the
less need I should have for swap.  But recall, Running Linux is "strongly
suggesting 16mb of memory, so twice that in swap is only 32mb.  You'd end
up with a 48mb memory limit which is well below the standing RAM in most
of our current machines.

> What I get from all this Larry is that for the i386 based machines, the general
> rule of thumb is double the RAM up to 128MB of swap.  If your resource 
> monitoring shows a high useage level for the swap, add another.

I don't think such rules of thumb make much sense.  Think about this
scenario:

1) Using 64mb RAM and 128mb swap and everything is working great with
current user demand.  

2) Add memory to bring machine to 512mb RAM, maintaining user demand
constant.

In this second scenario would you really see a value in having a gigabyte
of swap space?  User demand can be served with 1/3 of the installed RAM,
when would the swap be used in any significant way?

Times change and one of the things that's changed is that we're no longer
trying to get multi-tasking to occur in a small memory space (small
defined as being way less than user demand).  I suspect that the "twice
your RAM" rule of thumb has more to do with efficiency (if your swap
becomes more than twice your RAM it's either not going to be used (too low
a demand) or there's simply not going to be enough RAM to 'service' the
demand that's requiring the swap.  

In contrast, using less than twice is quite often the better way to go as
you simply don't need it because you've got so much memory in the
machine.  I'm sure that if you compared swap usage of a 64mb and 512mb
single-user machine you'd see this clearly.

Cheers --- Larry
 


Reply via email to