Swap partition sizes Was: Best partition size for Ubuntu Root

Smoot Carl-Mitchell smoot at tic.com
Fri May 2 18:52:11 UTC 2008


On Fri, 2008-05-02 at 14:54 +0100, Avi Greenbury wrote:

> > No, I believe it might come from the
> > http://www.tldp.org/HOWTO/Multi-Disk-HOWTO.html
> > which describes how to partition your hard drives for any distribution.
> 
> Which agrees with me somewhat when, in Section 4 (page 20 of the pdf[1]) it says:
> 
> "A more thorough approach is to consider swap space plus RAM as your total working set, so if you
> know how much space you will need at most, you subtract the physical RAM you have and that is the
> swap space you will need."

I run 2GB of RAM with 4GB of swap on my notebook.  The swap size is
overkill for my typical workload, but disk space is cheap and it is
better to be too big than too small.  The machine does not use any swap
until I start up a few VMs which I have set to use 512MB of RAM each.
Then the system starts to page and use swap space.

In general you want the host to page as little as possible, but the
Linux memory management system wants to use swap so it can free up
memory for I/O caching which improves performance on I/O intensive
applications.  Determining your overall workload size can be inexact,
especially on a general purpose desktop or notebook.  It is likely
easier to calculate on a server dedicated to some specific
functionality.

We should all feel fortunate that memory and disk are cheap these days.
When I first started using Unix on a VAX, 8 meg of memory with 16 meg of
swap was a big system!
-- 
Smoot Carl-Mitchell
System/Network Architect
smoot at tic.com
+1 480 922 7313
cell: +1 602 451 9005




More information about the ubuntu-users mailing list