Swap size

Gabriel Linder linder at jeuxvideo.com
Thu Jul 19 14:53:28 UTC 2007


[LoN]Kamikaze wrote:
> Derek Ragona wrote:
>> At 03:03 AM 7/19/2007, Gabriel Linder wrote:
>>> Hi,
>>>
>>> I plan to setup FreeBSD 6.2-RELEASE on my Core Duo laptop with 1GB of
>>> RAM.
>>>
>>> The handbook says "ideal swap size is 2xRAM", so should I use 2GB of
>>> swap ?
>> Yes unless you know how many applications will ever be run and their run
>> size.  The 2xRAM is so you can always have a reasonable performance
>> allowing swap.  You can still run out of swap, and this will cause a
>> panic.  With disks so cheap, why not use 2XRAM?
>
> Running out of swap doesn't cause a panic, it causes the largest process to be
> killed.
>
>
>>>  This seems a bit huge to me, I never used more than 400MB on Linux.
>>> If so, is there a limit of swap partition size (or number) on i386
>>> (for Linux it's 2GB per partition and 32 partitions max, but I don't
>>> know for FreeBSD) ?
>
> For a Desktop System 400M should be enough, I don't remember my Desktop system
> to ever use more than 1m of swap. However, the swap size should be large enough
> for a dump during a panic. So if you want to be able to do some debugging if
> you ever run into panics, your swap should be at least as large as your memory.
> Assuming that you might add more memory one day something between 2 or 4GB of
> swap look reasonable to me.



Thanks for the precisions, I will go for 2xRAM so.


More information about the freebsd-questions mailing list