mirror of
https://github.com/chatmail/relay.git
synced 2026-05-10 16:04:37 +00:00
feat(dovecot): disable fsync for LMTP and IMAP services
This is aimed at reducing SSD wear level. SSDs wear out because of writes according to <https://superuser.com/a/440219/1777696>, so anything reducing the writes should be helpful. For online users Maildir format that we use results in first storing the message in new/ and then moving to cur/ and then maybe even deleting it immediately for users with a single device or bots. Syncing all these changes to disk is unnecessary and wears SSDs.
This commit is contained in:
@@ -133,6 +133,11 @@ protocol lmtp {
|
|||||||
# mail_lua and push_notification_lua are needed for Lua push notification handler.
|
# mail_lua and push_notification_lua are needed for Lua push notification handler.
|
||||||
# <https://doc.dovecot.org/2.3/configuration_manual/push_notification/#configuration>
|
# <https://doc.dovecot.org/2.3/configuration_manual/push_notification/#configuration>
|
||||||
mail_plugins = $mail_plugins mail_lua notify push_notification push_notification_lua
|
mail_plugins = $mail_plugins mail_lua notify push_notification push_notification_lua
|
||||||
|
|
||||||
|
# Disable fsync for LMTP. May lose delivered message,
|
||||||
|
# but unlikely to cause problems with multiple relays.
|
||||||
|
# https://doc.dovecot.org/2.3/admin_manual/mailbox_formats/#fsyncing
|
||||||
|
mail_fsync = never
|
||||||
}
|
}
|
||||||
|
|
||||||
plugin {
|
plugin {
|
||||||
@@ -252,6 +257,9 @@ protocol imap {
|
|||||||
# sort -sn <(sed 's/ / C: /' *.in) <(sed 's/ / S: /' cat *.out)
|
# sort -sn <(sed 's/ / C: /' *.in) <(sed 's/ / S: /' cat *.out)
|
||||||
|
|
||||||
rawlog_dir = %h
|
rawlog_dir = %h
|
||||||
|
|
||||||
|
# Disable fsync for IMAP. May lose IMAP changes like setting flags.
|
||||||
|
mail_fsync = never
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user