[Dovecot] Migration questions...

Richard Hobbs richard.hobbs at crl.toshiba.co.uk
Wed May 13 18:55:43 EEST 2009


Timo Sirainen wrote:
> On May 13, 2009, at 9:57 AM, Richard Hobbs wrote:
> 
>>> Depends on the usage, but it's significantly better performing than
>>> UW-IMAP. Dovecot+mbox is also significantly faster than UW-IMAP+mbox.
>>
>> OK... so Dovecot is certainly significantly faster that uw-imapd in both
>> cases, but is dovecot fastest with mbox or maildir? I would assume
>> maildir, but you never know...
> 
> It's not that simple to answer. With mbox it's probably faster to read
> through all mails, because they're in a single file. With Maildir it's
> faster to delete mails, because it only needs to delete a single file,
> instead of moving data around in the mbox file. But Maildir has less
> problems and it's much less likely to get corrupted, so even if mbox
> performance would be better in some cases I'd recommend Maildir.

OK... so in both cases, the files are indexed and headers etc... cached,
so in both scenarios:

maildir - "slow" to read mails, but all indexed, so slowness kinda
disappears.

mbox - "slow" to delete mails - indexing will help this problem, but the
filesystem will still have work to do in order to join the two halves of
the file.

My take on the above is that overall, maildir will probably be faster,
and if it's less likely to corrupt and has fewer problems, i think
that's the format for us!

>>> http://wiki.dovecot.org/Migration/MailFormat -> mb2md.py
>>
>> how does this differ from the "convert-tool" script packaged with
>> dovecot itself?
> 
> convert-tool doesn't preserve UIDs, mb2md.py does.

Ah... that's a fairly critical piece of info, so thank you for that! :-)

>>>>> Would it be best to put all data on one array, and the indices on the
>>>>> other? We're basically after the fastest way to distribute the
>>>>> data! :-)
>>>
>>> Last I heard it was faster to keep index files in a separate disk than
>>> mailbox data. I've never verified this myself, but it sounds reasonable.
>>
>> Same here - i assume dovecot gives you a choice as to where it puts its
>> index files, right?
>>
>> Also... where are the maildir data files kept? homedirs or elsewhere?
> 
> mail_location setting specifies where both of them are kept. For example:
> 
> mail_location = maildir:~/Maildir:INDEX=/var/index/%u

Excellent - that makes life very simple!

>> However, does dovecot allow configuration of where to store both the
>> index files *and* cache files?
> 
> Whenever something is talking about "index files", it also means cache
> files.
> 
>> Given that we have 2 RAID arrays, should we put index files *and* cache
>> files on one array, and the data on another, or should put either the
>> index files *or* cache files on the same array as the data?
> 
> There's no choice, it's both or neither.
> 
> BTW. I don't these optimizations will make much of a noticeable
> difference for you. A single server with recent hardware should be able
> to easily handle hundreds of simultaneous users.

That's also good to know... i like to do a job right instead of relying
on faster hardware, as i'm sure you all do too, but it's good to know
that if i make one or two "non-optimal" choices along the way, it'll
probably be lightning fast anyway!

The main complaint we have from users is that their IMAP Inbox, with
5000 emails in it takes ages to appear, and no amount of coaxing will
convince them to split their inbox into multiple folders.

With maildir, and especially dovecot, this problem effectively
disappears! That's the theory anyway, right?

Thanks again!

Richard.

-- 
Richard Hobbs (IT Specialist)
Toshiba Research Europe Ltd. - Cambridge Research Laboratory
Email: richard.hobbs at crl.toshiba.co.uk
Web: http://www.toshiba-europe.com/research/
Tel: +44 1223 436999        Mobile: +44 7811 803377
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3306 bytes
Desc: S/MIME Cryptographic Signature
Url : http://dovecot.org/pipermail/dovecot/attachments/20090513/b8eda0eb/attachment-0001.bin 


More information about the dovecot mailing list