[Durham] Swap fills up then out of memory errors

Nick durham-lug at njw.me.uk
Sat Feb 18 00:29:26 UTC 2012

Quoth Dougie Nisbet:
> What appears to be happening is that the amount of swap being 
> allocated gradually creeps up, usually over several days, as 
> observed using something like gnome-system-monitor. I think I 
> understand the principle that it's not necessarily a bad thing 
> that all swap becomes allocated, while memory used remains low, as 
> idle programs can be swapped out even when memory is available. 

That isn't quite correct. Swap will always be used as a last option, 
as it will typically be no faster than your hard drive.

You're thinking of RAM usage, which may well gradually climb safely 
with cache & buffers. This is fine, as it's just storing stuff it 
thinks it'll need from the hard drive in RAM, which is much faster, 
but if the system runs low on memory it will just empty those 
caches. You can see them as the 'buffers' and 'cached' entries in 

So your swap gradually filling up is a sign of a memory leak long in 
the making.


More information about the Durham mailing list