dovecot: add tmpfs_index chatmail.ini parameter for storing index files in /dev/shm#757
dovecot: add tmpfs_index chatmail.ini parameter for storing index files in /dev/shm#757
Conversation
|
Maybe we can just use https://linuxvox.com/blog/devshm-in-linux/ instead of shipping our own tmpfs. |
hpk42
left a comment
There was a problem hiding this comment.
dovecot allows to set a separate index directory: https://doc.dovecot.org/2.3/configuration_manual/mail_location/#index-files which is preferable to creating symlinks
how is dovecot handling it when the (tmp) file system gets full?
f07ee83 to
f7f2c96
Compare
a1bc60d to
be35244
Compare
83cdb86 to
d318c9a
Compare
d318c9a to
d1bd9fc
Compare
d1bd9fc to
27443ca
Compare
| # but it's not clear how to disable them completely. | ||
| # According to https://doc.dovecot.org/2.3/settings/advanced/#core_setting-mail_cache_max_size | ||
| # if the cache file becomes larger than the specified size, it is truncated by dovecot | ||
| mail_cache_max_size = 500K |
There was a problem hiding this comment.
removing this limit will lead to no limit when we dont use the tmpfs option I presume?
This is a good question, along with the usual combined size of the caches on a large server. |
| self.remove_file(f"{mbox.basedir}/maildirsize") | ||
| for file in mbox.extrafiles: | ||
| if "dovecot.index" in file.path.split("/")[-1] and file.size > 500 * 1024: | ||
| self.remove_file(file.path) |
There was a problem hiding this comment.
This matches broadly and according to my brief research triggers a full index rebuild where the old max_size flag just pruned the cache, I wonder if this won't mean a lot of I/O churn.
| # Certificate renewal is your responsibility; changed files are | ||
| # picked up automatically by all relay services. | ||
| # tls_external_cert_and_key = /path/to/fullchain.pem /path/to/privkey.pem | ||
| # store index files in tmpfs (good for disk size and I/O, bad for ram) |
There was a problem hiding this comment.
This should be more informative I think. What are the performance implications / motivations to enable this? How big should your ram / tmpfs wrt. to number of chatmail accounts?
fix #644