Maximum Swapsize

Peter Jeremy peterjeremy at optushome.com.au
Tue Apr 11 09:28:25 UTC 2006


On Mon, 2006-Apr-10 18:45:53 -0700, Pete Slagle wrote:
>When you have very limited physical RAM you need a lot of swap space. 
>When you have more than enough RAM you don't need any swap space at all. 
>For a given set of applications, as RAM increases you need less swap 
>space, not more. And vice versa.

The key point here is "for a given set of applications".  Whilst I
could (in theory) attach 1GB swap to my 4MB 486 and run openoffice and
mozilla, in practice, the performance would rapidly discourage me.

In reality, you need enough RAM to hold your application's working set
(plus kernel and FS overheads) and enough swap to hold the rest of the
applications writable virtual space.  The 2:1 is a reasonably general
rule of thumb because if there's not enough RAM, people either add
more RAM or don't run as many applications.  That said, I run about
6:1 on my desktop at work because I tend to leave lots of windows lying
around idle for long periods.

-- 
Peter Jeremy


More information about the freebsd-stable mailing list