[Dovecot] Caching?

Bjørn T Johansen btj at havleik.no
Tue Nov 13 15:49:57 EET 2007


On Tue, 13 Nov 2007 15:17:48 +0200
Timo Sirainen <tss at iki.fi> wrote:

> On 13.11.2007, at 13.21, Bjørn T Johansen wrote:
> 
> > Any way to minimize the number of sql statements that dovecot do?
> >
> > (and I tried adding userdb prefetch { } but number of sql calls are  
> > still the same)
> 
> Did you add the userdb_* fields to passdb?

Yes...

> Did you put prefetchbefore userdb sql? 

Nope... That might be the reason....?

> Show dovecot -n output? 

# 1.0.7: /etc/dovecot/dovecot.conf
log_path: /lv1/logs/dovecot.log
protocols: imap imaps pop3 pop3s
listen: [*]
disable_plaintext_auth: no
login_dir: /usr/var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
mail_location: maildir:/opt/vmail/%d/%n
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
pop3_uidl_format(default): 
pop3_uidl_format(imap): 
pop3_uidl_format(pop3): %08Xu%08Xv
pop3_client_workarounds(default): 
pop3_client_workarounds(imap): 
pop3_client_workarounds(pop3): outlook-no-nuls
auth default:
  mechanisms: plain login digest-md5 cram-md5
  user: vmail
  passdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql.conf
  userdb:
    driver: passwd
  userdb:
    driver: prefetch
  userdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql.conf
  socket:
    type: listen
    client:
      path: /var/spool/postfix/private/auth
      mode: 432
      user: postfix
      group: postfix
    master:
      path: /var/run/dovecot/auth-master
      mode: 384
      user: vmai

Set auth_debug=yes to see  
> what SQL queries Dovecot actually sends.
> 
> For actual caching there's also auth_cache_size setting which is 0 by  
> default.

auth_cache_size is used for only authentication or all sql access?


BTJ


More information about the dovecot mailing list