[Dovecot] Index files
I am doing some testing with Dovecot and wondered if it was normal for the deliver program to create index files for an Inbox (the test Inbox is over 7MB), but to not update the index files after the initial creation, even though messages continue to come into the mailbox. Note that during this testing, no IMAP or POP accesses are being made. Would it matter if a command-line program such as mutt were reading/updating the Inbox in question? Shouldn't Dovecot delivery be continually updating the index files as new messages arrive in the Inbox?
--
Steven F. Siirila Office: Lind Hall, Room 130B Internet Services E-mail: sfs@umn.edu Office of Information Technology Voice: (612) 626-0244 University of Minnesota Fax: (612) 626-7593
On Tue, 2006-10-17 at 00:15 -0500, Steven F Siirila wrote:
I am doing some testing with Dovecot and wondered if it was normal for the deliver program to create index files for an Inbox (the test Inbox is over 7MB), but to not update the index files after the initial creation, even though messages continue to come into the mailbox. Note that during this testing, no IMAP or POP accesses are being made. Would it matter if a command-line program such as mutt were reading/updating the Inbox in question? Shouldn't Dovecot delivery be continually updating the index files as new messages arrive in the Inbox?
Are you're using 1.0.rc7 or newer? It fixed a bug related to this.
Deliver updates the indexes only when it determines that the indexes are up to date (mtime and file size match what indexes contain). If they aren't, it doesn't waste time in synchronizing the mbox but just lets the imap/pop3 do it later.
On Tue, Oct 17, 2006 at 02:40:46PM +0300, Timo Sirainen wrote:
On Tue, 2006-10-17 at 00:15 -0500, Steven F Siirila wrote:
I am doing some testing with Dovecot and wondered if it was normal for the deliver program to create index files for an Inbox (the test Inbox is over 7MB), but to not update the index files after the initial creation, even though messages continue to come into the mailbox. Note that during this testing, no IMAP or POP accesses are being made. Would it matter if a command-line program such as mutt were reading/updating the Inbox in question? Shouldn't Dovecot delivery be continually updating the index files as new messages arrive in the Inbox?
Are you're using 1.0.rc7 or newer? It fixed a bug related to this.
Actually, we are currently using 1.0.rc6, but will re-test with 1.0.rc10.
Deliver updates the indexes only when it determines that the indexes are up to date (mtime and file size match what indexes contain). If they aren't, it doesn't waste time in synchronizing the mbox but just lets the imap/pop3 do it later.
Hmm. Would it make sense to remove the files in this case? (Would it be more efficient for the next delivery if the files simply did not exist?)
--
Steven F. Siirila Office: Lind Hall, Room 130B Internet Services E-mail: sfs@umn.edu Office of Information Technology Voice: (612) 626-0244 University of Minnesota Fax: (612) 626-7593
On Tue, 2006-10-17 at 09:18 -0500, Steven F Siirila wrote:
On Tue, Oct 17, 2006 at 02:40:46PM +0300, Timo Sirainen wrote:
On Tue, 2006-10-17 at 00:15 -0500, Steven F Siirila wrote:
I am doing some testing with Dovecot and wondered if it was normal for the deliver program to create index files for an Inbox (the test Inbox is over 7MB), but to not update the index files after the initial creation, even though messages continue to come into the mailbox. Note that during this testing, no IMAP or POP accesses are being made. Would it matter if a command-line program such as mutt were reading/updating the Inbox in question? Shouldn't Dovecot delivery be continually updating the index files as new messages arrive in the Inbox?
Are you're using 1.0.rc7 or newer? It fixed a bug related to this.
Actually, we are currently using 1.0.rc6, but will re-test with 1.0.rc10.
OK, that's most likely your problem.
Deliver updates the indexes only when it determines that the indexes are up to date (mtime and file size match what indexes contain). If they aren't, it doesn't waste time in synchronizing the mbox but just lets the imap/pop3 do it later.
Hmm. Would it make sense to remove the files in this case? (Would it be more efficient for the next delivery if the files simply did not exist?)
Well.. You would be correct, except in that case Dovecot just recreates the index file. Maybe I should change this some day, so that the index file is created only when the first synchronization is done.
In any case although deleting the index would make the next delivery a bit more efficient (no need to open+read header), it would make the next mailbox synchronization less efficient (full resync vs. small updates), so from a total efficiency point of view I think it would be a bad idea. :)
On Tue, Oct 17, 2006 at 05:27:23PM +0300, Timo Sirainen wrote:
Deliver updates the indexes only when it determines that the indexes are up to date (mtime and file size match what indexes contain). If they aren't, it doesn't waste time in synchronizing the mbox but just lets the imap/pop3 do it later.
Hmm. Would it make sense to remove the files in this case? (Would it be more efficient for the next delivery if the files simply did not exist?)
Well.. You would be correct, except in that case Dovecot just recreates the index file. Maybe I should change this some day, so that the index file is created only when the first synchronization is done.
In any case although deleting the index would make the next delivery a bit more efficient (no need to open+read header), it would make the next mailbox synchronization less efficient (full resync vs. small updates), so from a total efficiency point of view I think it would be a bad idea. :)
You've got a good point. I suppose one could change some attribute of one of the index files (make one zero-length?) which would allow stat() to determine whether the index is valid or not. deliver would do that stat() and know that it doesn't need to check or update the index files, and imap/pop would do that stat() and know that it should resync the index files. Manual inspection of the index files (ls -l) would also reveal the state of the index files, too.
Just a thought.
--
Steven F. Siirila Office: Lind Hall, Room 130B Internet Services E-mail: sfs@umn.edu Office of Information Technology Voice: (612) 626-0244 University of Minnesota Fax: (612) 626-7593
participants (2)
-
Steven F Siirila
-
Timo Sirainen