dovecot v2 效能調校

調整cache

https://wiki.dovecot.org/Authentication/Caching
有三個可以調整

auth_cache_size: Authentication cache size, 0 disables caching (default). 
auth_cache_ttl: Time to live in seconds for cache entries. 
auth_cache_negative_ttl: If a passdb or userdb lookup didn't return any data (i.e. the user doesn't exist)
auth_cache_verify_password_with_worker: Password hash verifications are done by the auth master process by default. Setting this to "yes" moves the verification to auth-worker processes. v2.2.34+)
ps: It should be pretty safe to set very high TTLs

調整fsync與service_count

https://datahunter.org/dovecot_performance
可以調整fsync

#Default to no fsyncing
mail_fsync = never
protocol lda {
  # Enable fsyncing for LDA
  mail_fsync = optimized
}
protocol lmtp {
  # Enable fsyncing for LMTP
  mail_fsync = optimized
}
service imap-login {
   service_count = 0
   client_limit = $default_client_limit
   vsz_limit = 64M
}

發表迴響