[Dovecot] Large subjects increase memory-usage and enlarge index-files

Timo Sirainen tss at iki.fi
Mon Oct 8 04:45:14 EEST 2012


On Mon, 2012-10-08 at 03:11 +0300, Timo Sirainen wrote:

> The 3. part is what I like changing the least. An alternative solution
> would be to just not map the entire cache file into memory all at
> once. The code was actually originally designed to do just that, but
> munmap()ing + mmap()ing again wasn't very efficient. But for LMTP
> there's really no need to map the whole file. All it really wants is
> to read a couple of header records and then append to the file. Maybe
> it could use an alternative code path that would simply do that
> instead of mmap()ing anything. It wouldn't solve it for IMAP though.

Attached patch changes LMTP/LDA to not mmap() the target mailbox's cache
file. I did a few quick tests and it seems to work. I'll probably commit
it to 2.1 hg after some more tests.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: index-saveonly.diff
Type: text/x-patch
Size: 17995 bytes
Desc: not available
URL: <http://dovecot.org/pipermail/dovecot/attachments/20121008/e7909727/attachment-0004.bin>


More information about the dovecot mailing list