System crashing when swap hits 25%

Chris Snook csnook at redhat.com
Mon Mar 10 22:51:38 UTC 2008


Simon Slater wrote:
> 	G'day all,
> 		This is an inconvenience that I would like to get to the bottom of.  I
> have a PII 233MHz 512 MbRAM running FC6. All is fine until swap reaches
> about 25% used then the system hangs.  It will run for days with the
> swap at 10-15%.  My first thought was to run badblocks to see if that
> was the problem, since it is an old drive, but couldn't find the swap
> device with mount.

25% of your 1 GB swap space is about 50% of your total RAM.  50% is also 
the default value of the vm.overcommit_ratio sysctl, which controls how 
optimistically the system overcommits memory.  Coincidence?  Maybe, 
maybe not.

I suggest setting vm.overcommit_memory=2 with sysctl to turn on explicit 
overcommit control, and then try changing the value of 
vm.overcommit_ratio to see if that changes where your system dies.

Also, is the system actually crashing, or does it just get swaplocked 
and hang indefinitely when swap usage reaches 25%?  See if you can get 
sysrq-m and sysrq-t data out of the system.  You'll want to set 
kernel.sysrq=1 first.

-- Chris




More information about the users mailing list