[Dovecot] Expected size of index-files?

Timo Sirainen tss at iki.fi
Fri Feb 8 18:57:45 EET 2008


On Fri, 2008-02-08 at 17:45 +0100, Jan van den Berg wrote:
> I'm scared to use (index) files that go sort of unnoticed (it's not
> calculated in the maildirsize file) and can potentially grow with no
> limit. 

Only some truly badly behaving clients can cause them to grow
infinitely. This would require the client to fetch/search more and more
unique message headers. For example field1, field2, field3, ..
field1000. I don't think this is worth worrying about, although I guess
I should add code to prevent this. Added to TODO.

> But I am also curious what ":INDEX=MEMORY" will do with 100k users. How
> much MB RAM will one IMAP session on average take? 

The problem isn't how much memory it'll take. It's that Dovecot may use
a lot more disk I/O because it has to read and parse messages to find
some data instead of doing a couple of small reads from cache file to
get the same data.

The memory usage is actually less without indexes, because then no
fields are ever cached and the space used by dovecot.index.cache isn't
mapped to memory.

> And will this be
> removed from memory (or stay cached) when an IMAP session is closed? 

Operating system's buffer cache may still contain all the message files'
contents that were read during the session (which may have been avoided
with indexes on disk), but that's all.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080208/2f9a6e7f/attachment.bin 


More information about the dovecot mailing list