[Durham] Swap fills up then out of memory errors

Dougie Nisbet dougie at highmoor.co.uk
Sat Feb 18 18:00:07 UTC 2012


On 18/02/2012 00:18, Oliver Burnett-Hall wrote:
> Swap is used if you don't have enough system memory available. It's 
> called swap as the CPU can't use it directly; instead the contents of 
> an area of the RAM and the swap space are swapped so that the CPU can 
> then access the data. If both memory and swap are nearly full, this 
> happens constantly and the entire system grinds to a halt you'll be 
> able to hear the disk thrashing as data is read/written from/to disk 
> in small chunks. 

That's always been my understanding too about the way swap works but 
when I was working on HP-UX systems (long time ago) I recall the talk of 
the distinction between of swap and paging becoming a bit blurred, and 
that sometimes a process can be swapped if it has been idle for a long 
time, even if loads of memory is available. Could be a HP-UX specific 
thing. However, swapping is definitely occurring on my Debian boxes even 
with tons of memory available, and gradually creeping up. Which is why 
I'm a bit confused.

Testing it is tricky, as the 'creep-up' is so slow, so trying to figure 
out cause and effect is a nightmare!

Dougie



More information about the Durham mailing list