Javier de Miguel RodrÃguez
2011-Jan-17 21:58 UTC
[Dovecot] Question about indexes and maildir/sdbox/mdbox
Hello We are now running dovecot 2.0.9 with indexes in a ram disk and maildir storage in a test system. We have the following questions: - If there is a power outage / kernel crash, we will lose the content of ramdisk. We have tested that indexes are regenerated when a user logs in via imap, so e-mail access will be "slower" after a power outage / kernel crash, but everything should work as expected (TM). Are we missing something? - We are evaluating migrating from maildir to dbox. There are two alternatives: sdbox and mdbox. Reading about dbox in the wiki (http://wiki2.dovecot.org/MailboxFormat/dbox) we see that using a ram disk for indexes for mdbox is a really bad idea: /"Note that with dbox the Index files actually contain significant data which is held nowhere else. Index files for both *single-dbox* and *multi-dbox* contain message flags and keywords. For *multi-dbox*, the index file also contains the map_uids which link (via the "map index") to the actual message data. This data cannot be automatically recreated, so it is important that Index files are treated with the same care as message data files."/ So in mdbox we should not use a ramdisk for indexes. But what about sdbox? sdbox indexes work as maildir indexes? Are sdbox indexes bigger than maildir indexes? Thank you very much for your support Regards Javier
Charles Marcus
2011-Jan-17 22:04 UTC
[Dovecot] Question about indexes and maildir/sdbox/mdbox
On 2011-01-17 4:58 PM, Javier de Miguel Rodr?guez wrote:> We are now running dovecot 2.0.9 with indexes in a ram disk and maildir > storage in a test system. We have the following questions: > > - If there is a power outage / kernel crash, we will lose the > content of ramdisk. We have tested that indexes are regenerated when a > user logs in via imap, so e-mail access will be "slower" after a power > outage / kernel crash, but everything should work as expected (TM). Are > we missing something?If this is a heavy use box, having everyone's indexes being rebuilt at the same time could bring it to its knees... Since this is a server I'm sure you have adequate power protection (UPS), so only extended power outages might be an issue - but then you should also have it configured to safely shut down in this event, no? But anyway, yes, the indexes will be rebuilt and everything should continue working... -- Best regards, Charles
Timo Sirainen
2011-Jan-17 22:19 UTC
[Dovecot] Question about indexes and maildir/sdbox/mdbox
On 17.1.2011, at 23.58, Javier de Miguel Rodr?guez wrote:> So in mdbox we should not use a ramdisk for indexes. But what about sdbox? sdbox indexes work as maildir indexes? Are sdbox indexes bigger than maildir indexes?With both sdbox and mdbox the message flags are only stored in index files. That's one of the reasons why dboxes are fast. They don't waste I/O keeping flags and other metadata duplicated. sdbox indexes should be exactly the same size as maildir indexes. sdbox doesn't have equivalent of dovecot-uidlist file so there it uses less space, but then again the mail files it creates are a little bit larger since they contain some metadata.