Coda File System

Re: CODA and qmail ..

From: Jan Harkes <jaharkes_at_cs.cmu.edu>
Date: Mon, 31 Mar 2003 09:51:01 -0500
On Mon, Mar 31, 2003 at 02:21:00PM +0200, Simone Sestini wrote:
> At 13.30 31/03/2003 +0200, you wrote:
> >On Mon, 31 Mar 2003, Simone Sestini wrote:
> >> I'm installing  a CODA farm for a mail project..
> >> Today i'm configuring the SCM Server and i did that kind of partition.
> >>
> >>     Device Boot    Start       End    Blocks   Id  System
> >> /dev/sda1             1        64    514048+  82  Linux swap
> >> /dev/sda2   *        65      1339  10241437+  83  Linux
> >> /dev/sda3          1340      8924  60926512+   5  Extended
> >> /dev/sda5          1340      1341     16033+  83  Linux
> >> /dev/sda6          1342      1382    329301   83  Linux
> >> /dev/sda7          1383      1510   1028128+  83  Linux
...
> >>
> >> /dev/sda5 is the RVM Log and /dev/sda6 is the RVM MetaData
> >>
> >>  From /dev/sda8 to /dev/sda14 are all Reiserfs3 that i mount /vicepa
> >> /vicepb etc..
> >
> >Hello Simone,
> >
> >as mailfiles tend to be rather small, your data space (/vicep*)
> >could not be used more than for a small part, as the metadata storage
> >(/dev/sda6) will be filled up a lot sooner.
> 
> How much big should be the metadata area for menage all that partition ? or 
> i need to do various partitions of metadata ?
> I did that division because over all the FAQ ppls say to haven't more then 
> 8GB for vicepa or vicepb etc..

Hmm, I can't remember any 8GB limitations or recommendations anywhere.
My partitions are typically only 2GB for historical reasonss, we
couldn't back up a volume larger than 2GB, but as far as I know that has
been fixed long ago.

But Ivan is correct that depending on the type of mail storage you use,
your system will probably be requiring a lot of metadata.

    http://www.coda.cs.cmu.edu/misc/rvm-usage.html

It looks like you have a total of about 56GB of filespace, looking at my
own mailboxes most emails are in the range 2-4KB. The average size is
4061.1 bytes. Ofcourse I'm a unix user, and I don't really get large
attachments so the distribution of email sizes in your environment could
be very different. For instance the average size of linux-kernel emails
is 5467.52 bytes.

So dividing 56GB by 4096 bytes gives us approximately 14680064 separate
messages. Now if each message is a separate file this already adds up to
about 7 GB of metadata for just the files. Throw in another gig for
the directories and you see that a single server process will never be
able to handle all of this overhead. I'm not sure whether the numbers
that Peter wrote down in the RVM overhead figures include the metadata
overhead for backup volumes. If not these numbers have to be doubled.

You probably want to use RVM log and data in files, and use the option
that enables private mmaps. That will somewhat reduce memory/swap
pressure as untouched RVM pages can remain on disk and don't have to be
copied to anonymous (swap) memory during startup. And you'll probably
need at least 4 to 5 Coda server processes per machine.

Now if your average email size is more like 100KB, we're talking about
storing 587202 files. Then we only need 286 MB to store the associated
file metadata, which is easily done by a single server process.

You could start with a single server with 1GB of RVM (in files, using
map_private) and see how far it gets. What I have here is nowhere near
what you are trying to set up. I'm sorry to say that you're probably
going to run into all sorts of cornercases.

It is definitely a win to use different drives for RVM log, data and
/vicepa. I believe that keeping log separate from data and /vicepa is
most lucrative. The server is either performing transactions and is
accessing both the RVM log and /vicepa simultaneously, or it is
truncating the log and accessing RVM log and RVM data at the same time.
With private mmaps the server will also access RVM data and /vicepa
simultaneously, but the kernel's pagecache should be able to cache
enough to avoid most slowdowns.

Jan
Received on 2003-03-31 09:52:49