[Dovecot] Speed and memory probs writing large Maildir
Timo Sirainen
tss at iki.fi
Wed May 28 14:09:11 EEST 2003
On Wed, 2003-05-28 at 08:18, Robin Whittle wrote:
> When writing 2000 x 1k messages, it is totally different. Here are some
> times for writing from a Netscape 4.77 local mailbox to Dovecot and to
> Courier IMAP.
Thanks, this test helped to find several problems.
First problem was a memory leak with APPEND command. This caused the
huge memory usage. Here's a fix:
--- cmd-append.c 14 Feb 2003 08:00:52 -0000 1.24
+++ cmd-append.c 28 May 2003 11:01:03 -0000
@@ -197,6 +197,7 @@
count++;
}
+ imap_parser_destroy(save_parser);
if (!box->save_deinit(ctx, failed)) {
failed = TRUE;
Then I noticed that each APPEND command has to reopen and resync the
mailbox every time which gets just slower and slower. I think I'll make
it leave the mailbox open for a few seconds just in case another APPEND
comes. That should speed it up quite a lot.
Actually APPEND wouldn't even need the mailbox to be synced. I should
try fixing that too..
And finally there's a nasty bug in 0.99.10-test's new maildir syncing
code. I think I'll have to rewrite it a bit more to avoid wasting
memory..
More information about the dovecot
mailing list