[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: oom-killer vs system not reachable



On Sun, 19 Dec 2004, Sam Watkins wrote:
> > The system is mainly used as a dropbox for a huge amount of mail.
> > Mutt is opening and working on a 1.5 GB mbox. Considering this
> > usage, should we apply special configuration or should a 'vanilla
> > system' be able to cope with this?

Mutt might well try to mmap all that stuff.  Better make sure you have at least
1Gb of virtual memory, but I would go with 2Gb or more.

This is NOT one single 1.5GB mbox file is it?  If so, do yourself a big
favour and switch it to maildir.  Or store all that mail in an *indexing* IMAP
server (Cyrus IMAPd 2.1 or 2.2 comes to mind), and access it thorugh a
client that can do server-side searches through IMAP.

And make sure you use reiserfs, or xfs, or 2.6.9 ext3 with all the hash
tree options enabled if you're going to get 20000+ messages in a single
directory.

> I don't think mutt actually loads the entire mailbox into memory at any stage,
> though, so this shouldn't kill your computer.

It does try to, here.  And so does pine.  But enough swap should make it
tolerable.

> You can always try throwing more swap space at it, e.g. for another gigabyte of
> swap (as root):

This is a *very* good idea on any machine where you ever got the oom killer
to show up.  Add another gigabyte of swap immediately, then try to track
down whatever is chewing up memory.

> If this helps, you can use parted or whatever to resize your partitions and
> increase your swap partition, a swap partition is a bit more efficient than a
> swap file.

But not by much nowadays, if your filesystem is unfragmented enough that all
of the swap file can be allocated in one single area.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh



Reply to: