no swap makes system slower - why?

Smoot Carl-Mitchell smoot at tic.com
Mon Nov 5 02:55:59 UTC 2007


On Sun, 2007-11-04 at 21:32 -0500, Felix Miata wrote:

> There is no such thing as a swapless setup. If the system wants to swap and
> there is no swap partition, it will swap to a file on /.

I do not believe this is correct. You can configure a GNU/Linux to not
use swap.  However, if your virtual memory requirements exceed your
physical memory then processes will start to die when they request
additional memory. 

For some systems running without swap is certainly possible, if you have
enough RAM and your concurrent application memory requirements do not
exceed your physical memory. I can see special purpose servers based on
GNU/Linux running without a swap partition, say, for example a firewall
or a time server.  However, for a general purpose system configuring
swap is a good idea, even if it is lightly used.  Diskspace is cheap
these days and is good insurance to have some swap space available for
those times when virtual memory demand exceeds the available physical
memory.

My notebook runs with 2 GB of physical memory and 2 GB of swap. Most of
the time swap is not even touched. However, when I start up my virtual
Windows box running in VmWare, it does start to page out, especially
when I am running heavy memory footprint applications like OpenOffice,
Evo or Firefox at the same time
-- 
Smoot Carl-Mitchell
System/Network Architect
email: smoot at tic.com
cell: +1 602 421 9005
home: +1 480 922 7313




More information about the ubuntu-users mailing list