[Dovecot] mail_fsync=never doesn't work?
Timo Sirainen
tss at iki.fi
Mon Sep 27 17:52:10 EEST 2010
On Mon, 2010-09-27 at 16:31 +0200, Attila Nagy wrote:
> doveconf -n:
> mail_plugins = $mail_plugins quota
One annoying problem about v2.0's doveconf -n output is that it hides
when using multiple var=$var lines.. Did you have more plugins than just
quota enabled?
> Should I set mail_fsync for only pop and imap instances? Currently I
> don't use Dovecot's lmtp or deliver, but will, so there I can't allow
> disabling fsync. I don't like setting this to never, but after a
> migration from courier, the machine couldn't handle the load with fsync,
> so this is a must.
Yeah, either set it to only protocol imap/pop3 {} or alternatively put
mail_fsync=no to protocol lda/lmtp {}.
> BTW, just curious, what is the rationale of the two fstats so close
> together?
It's because of how the code works internally. It would be too much
trouble to avoid the second call and would make the code uglier. fstat()
is cheap anyway.
> I've searched for some more examples and each of them were like this
> one. It seems that Dovecot copies the subscriptions file to this
> temporary file and then fsyncs it. And the question also arises: why?
Fixed: http://hg.dovecot.org/dovecot-2.0/rev/4959db811d29
Also http://hg.dovecot.org/dovecot-2.0/rev/432208994270 avoids multiple
write() syscalls. Although it still does writes to temp file even when
it's not necessary, but that's again annoyingly too much trouble to
prevent..
> And more specifically: why in a pop3 server?
Do you have autocreate plugin enabled with autosubscribe plugin
settings? You didn't show your full doveconf output so I have to guess..
More information about the dovecot
mailing list