On Mon, Oct 13, 2014 at 12:15:31PM -0400, erik quanstrom wrote:
> On Sun Oct 12 14:37:47 EDT 2014, st...@quintile.net wrote:
> > I am fairly sure the problem is to do with RAM size rather than the 
> > raspberry pi per-se.
> > 4000 messages takes up a lot of space - and upas stores messages in RAM.
> 
> it's a little worse than this, actually.
> 
> since upas stores messages in mbox format, the whole file needs to be read or 
> written on
> update.  certainly one could optimize the read bit, but that would be 
> difficult  this means
> that the the whole mbox gets written to the dump every day, and you need 
> about 2x the
> mailbox size ram for each upas/fs that is run.  this does not work out well 
> for large mm
> messages, or small ram boxes like the pi.
> 
> the solutions to this are straightforward
> (1) store one message per file,
> (2) cache important data in an index to avoid opening all files,
> (3) avoid O(n²) startup time due to small hash table sizes and high load 
> factor,
> (4) load message data on demand so ram required is MAX(largest mm hunk, 10mb).

Have you considered other mailbox formats, such as maildir, for instance? Seems
that it could solve at least some of the problem.

-- 
Eduardo Alvarez

"Stercus, Stercus, Stercus, moriturus sum"
  -- Rincewind The Wizzard

Attachment: pgpReua3HkHjV.pgp
Description: PGP signature

Reply via email to