public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <rpurdie@rpsys.net>
To: LKML <linux-kernel@vger.kernel.org>
Subject: Linux machines dieing in swap storms
Date: Thu, 25 Oct 2007 16:20:41 +0100	[thread overview]
Message-ID: <1193325641.5776.21.camel@localhost.localdomain> (raw)

I've got a problem I keep running into. My computers have buggy software
which can sometimes run out of control. Two specific examples:

Evolution: Sometimes its memory usage decides to suddenly grow out of
control. It usually idles at around 300MB, you can watch it in top,
doubling, trebling and ending up going past the 1200MB mark. My system
has 1.5GB ram and you notice it swapping heavily past say 800MB.

Spamassassin: If my mail server log files hit the 2GB file size limit of
the filesystem something strange happens and for whatever reason spamd
suddenly starts growing in memory usage until it uses up all available
system memory.

Arguably both pieces of software are buggy, I accept that, fine. 

In both machines in totally different circumstances what happens next is
bad. The systems swap more and more heavily trying to cope with these
out of control processes. Network interactivity stops. The swap storm
gets so bad you can't log onto the console any more. I've left machines
in this state for 1-2 hours and they don't come back. Watching the
console, the OOM killer does kick in but it never kills the problem
process (both spamd and evolution are long running processes that have
suddenly gone out of control). In then end, you have to hit the reset
switch :(. This happened to my desktop once again about 10 minutes ago
and its *extremely* frustrating. Sometimes I can catch and kill the
offending process but I shouldn't have to.

This isn't a new problem. My mail server used to be running an ancient
2.6.12 kernel and I upgraded it to 2.6.22.X in an effort to solve this
problem which no change. My desktop shows exactly the same kind of OOM
swap storm behaviour (2.6.20 based).

I realise that tuning the OOM killer is a really tricky problem but
something needs improving as the current user experience is broken.

I'm seriously tempted to add a "kill the process using the most memory"
key combination into SysRq which might let me save the desktop but won't
help with my remote server. I could also just disable swap I guess.

Advice on solving this welcome preferably in mainline but I'll happily
hack my kernels with a workaround if need be.

Cheers,

Richard



             reply	other threads:[~2007-10-25 15:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25 15:20 Richard Purdie [this message]
2007-10-25 16:13 ` Linux machines dieing in swap storms Alan Cox
2007-10-25 18:28   ` Richard Purdie
2007-10-25 18:34 ` Rik van Riel
2007-10-25 19:55 ` Simon Arlott
2007-10-26  2:08 ` David Newall
2007-10-26 15:14 ` Lenar Lõhmus
     [not found] <9icP2-2hb-17@gated-at.bofh.it>
     [not found] ` <9ifML-6Xs-25@gated-at.bofh.it>
2007-10-26  3:56   ` Bodo Eggert
2007-10-26  4:03     ` Rik van Riel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1193325641.5776.21.camel@localhost.localdomain \
    --to=rpurdie@rpsys.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox