How much swap space for a 32 GB RAM system?
corbe at corbe.net
Tue Jul 22 16:23:33 UTC 2014
Arthur Chance <freebsd at qeng-ho.org> writes:
> I'm getting a new machine with 32 GB of memory. The old "twice
> physical memory" sizing seems ridiculous, so how big should I make
> swap? Do I even need swap with this much memory?
The rule of thumb is 1.5x physical RAM but that's an antiquated notion.
With that much RAM in your system, you shouldn't ever need swap. But
you want to build in a "I need to add more RAM to this system" buffer
so that you don't run out of memory and crash your application if your
size requirements happen to change.
So here's what I do: 2GB of swap. Then I set my monitoring system to
alert as soon as I get below 97% available swap space. 97% is a good
number because some things will end up in swap no matter how you tune
Also make sure kern.ipc.shm_use_phys=1.
More information about the freebsd-questions