11 May 2012 18:27
Re: index IO patterns
Timo Sirainen <tss <at> iki.fi>
2012-05-11 16:27:00 GMT
2012-05-11 16:27:00 GMT
On 11.5.2012, at 13.56, Javier de Miguel RodrÃguez wrote: >> Even without LDA/LMTP dovecot-imap needs to write right? It would >> need to update the index every time an imap connect happens and >> new mails are found in the mail store. > > Well of course. Indexes are also updated when flags are modified, moved a messages, delete a message, etc.. But in my setup there are 65% reads and the rest writes There are several hard coded values related to read/write percentages. If you're interested you could try if changing them increases the read%: mail-index-private.h: /* Write to main index file when bytes-to-be-read-from-log is between these values. */ #define MAIL_INDEX_MIN_WRITE_BYTES (1024*8) #define MAIL_INDEX_MAX_WRITE_BYTES (1024*128) mail-cache-private.h: /* Never compress the file if it's smaller than this */ #define MAIL_CACHE_COMPRESS_MIN_SIZE (1024*50) /* Compress the file when deleted space reaches n% of total size */ #define MAIL_CACHE_COMPRESS_PERCENTAGE 20 /* Compress the file when n% of rows contain continued rows. 200% means that there's 2 continued rows per record. */ #define MAIL_CACHE_COMPRESS_CONTINUED_PERCENTAGE 200 Increasing this might also improve read performance, compat.h: /* Try to keep IO operations at least this size */ #ifndef IO_BLOCK_SIZE # define IO_BLOCK_SIZE 8192 #endif All of these are just runtime checks (not saved anywhere), so there's no danger in changing them.
RSS Feed