Swap size

Lowell Gilbert freebsd-questions-local at be-well.ilk.org
Sun Jul 4 20:54:46 PDT 2004


Lists <lists at perespim.net> writes:

>     What swap size should i use having 768 Mb of memory?
>     I've heard something about preformance degradation if
>     swap size is bellow 2x of ram...

You don't *need* ANY swap.  Until you fill up your RAM, at which point
it's nice to have some swap space instead of having the kernel start
killing processes.  

In order to do a crash dump, you need an overwritable partition that's
at least slightly larger than your RAM.  The swap partition is often
given this job as well as serving as swap space.

If you have some idea of your worst-case virtual memory usage,
allocate that much swap (less about the amount of RAM you have).  If
you don't know, either set aside a huge amount of space or experiment
and see how much you need (and then allocate half again as much to be
safe).  


More information about the freebsd-questions mailing list