[Dovecot] maildir vs mdbox
Hi,
I am planning on running on test between maildir and mdbox to see which is a better fit for my use case. And I'm just looking for general advice/recommendation. I will post any results I obtain here.
Important question: I have multiple users hitting the same email account at the same time. Can be a problem with mdbox? (either via thunderbird or with custom webmail apps). I remember having huge issues with mbox a decade ago because of this. Maildir fixed this... will mdbox reintroduce this problem? This is a very important point for me.
Here is my use case:
- Ubuntu server (any specific recommandations on FS to use?)
- Standard PC hardware (core i5 or i7, few gigs of ram, hdds at first, probably ssd afterwards, nothing very fancy)
- Serving only a hand full of email accounts but some of the accounst have over 3 millions emails in them (with individual mail folders having 100k+ emails)
- Will use latest dovecot (2.1 when it comes out)
- fts-lucene or fts-solr?
-jd
On 28.1.2012, at 17.59, Jean-Daniel Beaubien wrote:
I am planning on running on test between maildir and mdbox to see which is a better fit for my use case. And I'm just looking for general advice/recommendation. I will post any results I obtain here.
Maildir is good for reliability, since it's just about impossible to corrupt, and even in case of filesystem corruption it's easier to recover than other formats. mdbox is good if you want the best performance.
Important question: I have multiple users hitting the same email account at the same time. Can be a problem with mdbox?
No problem.
- Serving only a hand full of email accounts but some of the accounst have over 3 millions emails in them (with individual mail folders having 100k+ emails)
Maildir gets slow with that many mails in one folder.
- fts-lucene or fts-solr?
fts-lucene uses the latest CLucene version, which is a little old. With fts-solr you can use the latest Solr/Lucene. So as long as you don't mind setting up a Solr instance it should be better. The good thing about fts-lucene is that you can simply enable it and it works without any external servers.
Wow, incredible response time :)
I have 1 more question which I forgot to put in the initial post.
Considering my use case (small number of accounts but alot of emails per account, and I should add that they are mostly small emails, most under 5k, alot under 30k) what mdbox setting would you recommend i start testing with (mdbox_rotate_size and mdbox_rotate_interval).
-JD
On Sat, Jan 28, 2012 at 11:05 AM, Timo Sirainen <tss@iki.fi> wrote:
On 28.1.2012, at 17.59, Jean-Daniel Beaubien wrote:
I am planning on running on test between maildir and mdbox to see which is a better fit for my use case. And I'm just looking for general advice/recommendation. I will post any results I obtain here.
Maildir is good for reliability, since it's just about impossible to corrupt, and even in case of filesystem corruption it's easier to recover than other formats. mdbox is good if you want the best performance.
Important question: I have multiple users hitting the same email account at the same time. Can be a problem with mdbox?
No problem.
- Serving only a hand full of email accounts but some of the accounst have over 3 millions emails in them (with individual mail folders having 100k+ emails)
Maildir gets slow with that many mails in one folder.
- fts-lucene or fts-solr?
fts-lucene uses the latest CLucene version, which is a little old. With fts-solr you can use the latest Solr/Lucene. So as long as you don't mind setting up a Solr instance it should be better. The good thing about fts-lucene is that you can simply enable it and it works without any external servers.
On 28.1.2012, at 18.13, Jean-Daniel Beaubien wrote:
Considering my use case (small number of accounts but alot of emails per account, and I should add that they are mostly small emails, most under 5k, alot under 30k) what mdbox setting would you recommend i start testing with (mdbox_rotate_size and mdbox_rotate_interval).
mdbox_rotate_interval is useful only if you want smaller incremental backups (so files that are backed up no longer change unless messages are deleted). Its default is 0 (I just fixed example-config, which showed it as 1day).
I don't really know about mdbox_rotate_size. It would be nice if someone were to test different values over longer period and report how it affects disk IO.
On Sat, Jan 28, 2012 at 11:37 AM, Timo Sirainen <tss@iki.fi> wrote:
On 28.1.2012, at 18.13, Jean-Daniel Beaubien wrote:
Considering my use case (small number of accounts but alot of emails per account, and I should add that they are mostly small emails, most under 5k, alot under 30k) what mdbox setting would you recommend i start testing with (mdbox_rotate_size and mdbox_rotate_interval).
mdbox_rotate_interval is useful only if you want smaller incremental backups (so files that are backed up no longer change unless messages are deleted). Its default is 0 (I just fixed example-config, which showed it as 1day).
To be honest, the smaller incremental backup part is interesting. That along with auto-gzip of the mdbox files are very interesting for me.
I don't really know about mdbox_rotate_size. It would be nice if someone were to test different values over longer period and report how it affects disk IO.
I was thinking on doing a test with 20MB and 80MB, look at the results and go from there.
Btw, when I migrate my emails from Maildir to mdbox, dsync should take into account the rotate_size parameter. If I want to change the rotate_size parameter, I simply edit the config file, change the parameter (erase the mdbox folder?) and re-run dsync. Is that correct?
On 28.1.2012, at 19.02, Jean-Daniel Beaubien wrote:
Btw, when I migrate my emails from Maildir to mdbox, dsync should take into account the rotate_size parameter. If I want to change the rotate_size parameter, I simply edit the config file, change the parameter (erase the mdbox folder?) and re-run dsync. Is that correct?
Yes. You can also give -o mdbox_rotate_size=X parameter to dsync to override the config. The mdbox_rotate_size is started to be used immediately, so if you increase it Dovecot may start appending new mails to old files. The existing files aren't immediately shrunk, but during purge when writing new files the files can become smaller.
participants (2)
-
Jean-Daniel Beaubien
-
Timo Sirainen