On 1 Oct 2019, at 16.31, Ralf Hildebrandt via dovecot <[hidden email]> wrote:
> I set up system copying all mails to a backup system.
> This used to work without a hitch - now in the last few days mails
> would pile up in the Postfix Queue, waiting to be delivered using the
> lmtp transport into dovecot.
> So dovecot was being slow, but why? After all, nothing changed.
> After reading some articles on stackoverflow I found a way of finding
> out which file gets the most IO:
> % sysdig -c topfiles_bytes;
> This command quickly pointed to ~/mdbox/mailboxes/INBOX/dbox-Mails/dovecot.index.tmp
> That file was written excessively.
Was it one user's dovecot.index.tmp or for a lot of users? This means that dovecot.index is being rewritten, which should happen only once in a while, but now it sounds like it's happening maybe for every mail delivery. If it's still happening, could you send me one folder's dovecot.index and dovecot.index.log files? (They don't contain anything sensitive other than maybe message flags.)
> I then put ~/mdbox/mailboxes/INBOX/dbox-Mails/ into tmpfs and alas, the queue would drain quickly.
> But why is that? Why would the index file be updated so often?
> This is dovecot 18.104.22.168-1~bionic
So you had been running this version already for a while, and then it just suddenly started getting slow?
I tried to reproduce this with imaptest and Dovecot that is patched to log when dovecot.index is being rewritten, but there doesn't seem to be any difference with v2.2.36, v2.3.7 or git master.
Re: [ext] dovecot 22.214.171.124-1~bionic: Performance issues caused by excessive IO to ~/mdbox/mailboxes/INBOX/dbox-Mails/dovecot.index.tmp
> On 16/10/2019 13:31 Ralf Hildebrandt via dovecot <[hidden email]> wrote:
> * Ralf Hildebrandt via dovecot <[hidden email]>:
> > * Timo Sirainen <[hidden email]>:
> > > > BTW: This post is a followup to my "2.3.7 slower than 2.3.6?" post from back in July.
> > >
> > > Fixed by https://github.com/dovecot/core/commit/5e9e09a041b318025fd52db2df25052b60d0fc98 and will be in the soon-to-be-released v2.3.8.
> > I stopped 2.3.7, copied over the index files from the ramdisk into
> > the physical "realm" and restarted with a fresh 2.3.8. It probably
> > takes a few days to be absolutely sure.
> So, in general the performance issues are gone.
> I'm seeing odd hourly spikes almost every hour, on the hour.
> You might say: Well yes, that's a cronjob sending lots of mails. But
> it isn't. There's not more or less mail coming in at that very moment.
> I suspect something in dovecot running every hour (DH key regeneration?)
> Ralf Hildebrandt
2.3.7 does not generate DH keys. It's been removed since 2.3.0
Is it possible for you to track and find out which process is causing the peak?