9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] store 9p session-only values using lib9p
Date: Thu, 12 Jun 2008 06:04:19 -0400	[thread overview]
Message-ID: <4c624048dd2bc06d5db04171f51e3dd3@quanstro.net> (raw)
In-Reply-To: <e32c88e049e6f0d50c8edabb48d110e9@9grid.es>

> at the moment i'm playing only with mbox not imap or pop, i have a version with cache per message that 'works', upas/nedmail and acme/mail are able to read messages 'nicely', but attachments are not decoded.

i have a couple of reservations about mbox format.  first, a majority
of users that i need to support have inboxes >10mb and some
have mailboxes >100mb.  thus deleting an older message will require
rewriting the whole file, and if it's not the last message, will take
up quite a bit of storage, even on venti.

second, it's very difficult to cache.  for example, suppose i have two
instances of my mail fs interpreting the same mbox at the same time.
suppose that i delete the 5th out of 500 messages with the first.  the
second will then have to reread the entire mbox to get its pointers
right.  even if i write an index with the first, the entire index
needs to be reread.

third, since large messages tend to be really stinking huge, it is not
efficient to read entire messages to deduce the mime structure.  (ned
reads the mime structure of each doc on startup.) that last mime part
may be tens of mb into the

you'll notice that if one uses email in the way it was used
traditionally in unix environments, that a 500 message, inbox or 15mb
message is unreasonable.  for traditional uses, mbox format and
loading the whole stinking thing into memory is a great idea.

unfortunately, that's now how people use email these days.
our two machines running upas/fs burn up to 5gb of ram.
old rewritten mail adds several hundred mb/day to the dump.

> also file lengths is going to be a problem if i'm going to decode files within the fs.
>
> i've put what i have in /n/sources/contrib/gabidiaz/wip/mboxfs

i've adapted upas/fs to use a directory for mailboxes (mdir) by default.
mailbox types that support caching (mdir and imap4) keep their cache
below Maxcache or Σ of (actively) referenced messages, whichever is bigger.

i've also adapted the rest of upas, including deliver and marshal to
understand mdir format.  imap4d should be done soon.

this upas/fs keeps an index, so in most cases, emails are not reread unless they are
viewed.  the index contains some information -- like flags -- not recorded
in the mail.

i'd be happy to share a working copy to those interested.  but it's
not ready to be inflicted on the world yet.  the "From " line date is
unresolved and imap4d still thinks it knows how to append a message
to a mailbox.

> about the From line, qmail man page about mbox format says it is composed of From space sender@... space current date, and it is generated by the delivery agent, but moving one message from a box to another doesn't use the delivery agent :-?

why not?  this seems an arbitrary distinction between the inbox and
every other mailbox.

- erik




  reply	other threads:[~2008-06-12 10:04 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-11 20:06 gdiaz
2008-06-11 20:48 ` Russ Cox
2008-06-11 20:58   ` gdiaz
2008-06-11 23:44 ` erik quanstrom
2008-06-12  0:01   ` [9fans] upas/fs Russ Cox
2008-06-12  2:31     ` erik quanstrom
2008-06-12  2:59       ` Lyndon Nerenberg
2008-06-12  8:34   ` [9fans] store 9p session-only values using lib9p gdiaz
2008-06-12 10:04     ` erik quanstrom [this message]
2008-06-12 10:24       ` Fco. J. Ballesteros
2008-06-12 10:28         ` Fco. J. Ballesteros
2008-06-12 10:39         ` gdiaz
2008-06-12 10:43           ` Francisco J Ballesteros
2008-06-12 10:55             ` gdiaz
2008-06-12 11:04               ` Francisco J Ballesteros
2008-06-12 11:11                 ` gdiaz
2008-06-12 17:16                 ` lucio
2008-06-12 12:25         ` erik quanstrom
2008-06-12 12:32           ` erik quanstrom
2008-06-12 14:03           ` Francisco J Ballesteros
2008-06-12 14:25             ` erik quanstrom
2008-06-12 14:49               ` Fco. J. Ballesteros
2008-06-12 14:55                 ` Fco. J. Ballesteros
2008-06-12 15:06                 ` erik quanstrom
2008-06-12 17:12         ` lucio
2008-06-12 10:26       ` gdiaz
2008-06-12 11:09         ` erik quanstrom
2008-06-12 13:29           ` gdiaz
2008-06-12 14:10           ` Russ Cox
2008-06-12 14:10             ` erik quanstrom

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=4c624048dd2bc06d5db04171f51e3dd3@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /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;
as well as URLs for NNTP newsgroup(s).