7
1
I do not want my computer to swap data to disk. I have no swap partition:
$ free total used free shared buffers cached Mem: 3841912 3670012 171900 0 74980 699652 -/+ buffers/cache: 2895380 946532 Swap: 0 0 0
Back in the day (maybe as recently as kernel 2.4?) this used to work. Memory-hungry processes would be killed by the oom killer and I would restart them. But now (Linux 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64) google-chrome (13.0.782.24 beta) regularly sends my machine into a death-spiral of swapping. Or at least something that feels like swapping: X windows take forever to update, disk drive whirs, gnome panel memory chart hits the ceiling, and I see this message in the syslog:
rtkit-daemon[1771]: The canary thread is apparently starving. Taking action. rtkit-daemon[1771]: Demoting known real-time threads. ...
But, according to syslog, the kernel does not run the oom killer. For good measure, I set swappiness to 0:
$ cat /proc/sys/vm/swappiness 0
My workaround is to use ctrl-alt-sysrq-f when this starts to happen. Anyone have a recipe for configuring Linux to run oom_kill on its own, in this situation?
1
Are you sure that the OOM Killer is actually not running? It's certainly possible that Chrome dodges the OOM killer. Run the second program here to see if the OOM killer is working or not.
– new123456 – 2011-06-18T02:33:37.133I am sure the OOM Killer is not running as soon as I would like it to. The only time I see "invoked oom-killer" in syslog is when I invoke it manually -- after more than a minute of swapping. – Joe – 2011-06-18T16:46:36.130
Update: I'm on kernel 3.0.0 (and new hardware) and the problem remains. I have to be proactive about killing google-chrome, because once it gets deep into the death-spiral, even the magic sysrq key fails to revive the system. – Joe – 2011-09-23T07:31:14.403
What I don't understand about this question is: If you had no swap space configured, how were you swapping? – Michael Hampton – 2012-07-28T20:32:05.027
Well, as mentioned in the question, it felt like swapping in that the machine would slow way down and it would be hard to get apps to respond but they would, eventually. It may have really been the kernel waiting for chrome to release memory or something. – Joe – 2012-07-29T23:16:05.097