[Dovecot] merging the best of mdbox and sdbox

Joan Moreau jom at grosjo.net
Thu Jan 6 00:49:39 EET 2011



Sorry to insist, but the process you describe (copy up to 1GB (why ?
I still do not understand) ) is exactly the "sdbox" approach (one file
per message in each IMAP subfolder) 

Let's please spend some more
analysis on this. 

On Thu, 6 Jan 2011 00:45:29 +0200, Timo Sirainen
wrote: 

> With maildir, single-dbox or multi-dbox when you copy a
message, just about nothing is read from disk and very little is written
to disk. For example in Maildir case a copy is the same as doing:
> 
>
ln ~/Maildir/.source/cur/1234 ~/Maildir/.dest/cur/1234
> 
> This only
accesses the file's metadata. It would be just as fast for a file of 1
kB or 1 GB. The file contents aren't read at all, only the inode is
copied.
> 
> With your idea of multi-dbox-per-mailbox it would actually
have to read the 1 kB or 1 GB of data and write the 1 kB or 1 GB of data
to another file. Much slower.
> 
> On 6.1.2011, at 0.30, Joan Moreau
wrote:
> 
>> I am not sure I understand why it would be "read entirely",
as it is the same as reading a message when accessing a folder and
writing a file when a new message in arriving.... which is the very most
common activity of a mail server... so not sure about any "wasteful" I/O
Can we spend some more thoughts on this ? On Thu, 6 Jan 2011 00:17:36
+0200, Timo Sirainen wrote: 
>> 
>>> On 6.1.2011, at 0.11, Joan
Moreau
>> wrote: 
>> 
>>>> Is there a way to use the mdbox format (i.e.
several
>> message per files) for EACH IMAP folders (sdbox approach) ?
ctual
>> ritten entirely, rather than a) with sdbox it can use a hard
link() call, b) with mdbox it can update 3 indexes. Copying is a rather
common operation since clients often move messages to Trash, so the
extra writing would be a bit wasteful.


More information about the dovecot mailing list