[Dovecot] imap memory footprint rather large
tss at iki.fi
Tue Aug 14 01:24:29 EEST 2007
On Mon, 2007-08-13 at 23:24 +0200, martin f krafft wrote:
> also sprach martin f krafft <madduck at madduck.net> [2007.08.13.2259 +0200]:
> > Memory use seems to be O(n) in the size of the folder. On the folder
> > with 70k messages, dovecot seems to allocate 280m of memory, which
> I just saw in the logs:
> mmap() failed with index cache file
> /home/madduck/.maildir/.store/dovecot.index.cache: Cannot allocate
> and looking at the file, it's in fact 280m in size.
> Does dovecot need to read/mmap the entire file?
mmaping the whole file doesn't have problems, as long as it fits into
memory. By default mail_process_size=256 meaning it's limited to 256MB.
This is just to make sure that if there are memory leaks Dovecot doesn't
eat all the memory. So you could grow the value or even set it to 0 to
disable it, and it would work just fine.
> Is there a way to vacuum/reduce/optimise the cache?
You can always delete it, but if your client wants the same information
all over again it gets grown to the same size. Probably it doesn't after
the initial mailbox load. Dovecot should also drop unused fields from it
after a week or so, but currently this isn't done.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20070814/3f1520e7/attachment.bin
More information about the dovecot