out of swap space

RW rwmaillists at googlemail.com
Tue Oct 28 13:01:50 UTC 2014


On Mon, 27 Oct 2014 16:39:52 -0500
Adam Vande More wrote:

> On Mon, Oct 27, 2014 at 2:57 PM, Jim Pazarena <fquest at paz.bz> wrote:
> 
> > There is a lot of historical chatter about the amount of swap space
> > required.
> > But for my question, I haven't seen discussion:
> > What HAPPENS when the system flags "out of swap space".
> > Does a process die? or does the system merely become very sluggish?
> >
> 
> Both, a process is killed and  whenever you're starting to use swap
> space you should expect the system to become sluggish.

I don't know that anything bad happens simply because you run out of
swap. Processes are killed when the system is unable to find enough
memory to carry on. 

For example if you have 4GB of RAM and 1GB of swap, and you leave 2GB
on tmpfs, you may fill swap without even coming close to running out of
memory. Another example is a very slow memory leak where running out of
memory could happen a long time after running out of swap. 

There seems to be a common trend of allocating swap space that's much
smaller than RAM. When you combine that with tmpfs use, I suspect it
may have become much more common to run out of swap without
consequences.


More information about the freebsd-questions mailing list