Maximum Swapsize

Tony Maher anthony.maher at uts.edu.au
Tue Apr 11 02:22:37 UTC 2006


Pete Slagle wrote:
> Daniel O'Connor wrote:
> 
>> The old "swap size = 2x RAM" rule is no longer applicable unless you
>> have a very special application.
> 
> This "rule" always seemed counterintuitive to me anyway.
> 
> 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.

Provided the maximum "working set" of processes fits into RAM, you
have sufficient RAM.  Seldom used processes can be swapped out
with minimal impact on the system.  So as well as the "very special
aplication" exception, the workload patterns (over a day) may allow for
reduced RAM and utilize swap instead. In which case swap size should be
sized to match.  Maybe not important for a single machine but for multiple
machines the cost of RAM memory adds up.

--
tonym


More information about the freebsd-stable mailing list