[Dovecot] Performance problems while running doveadm purge

Timo Sirainen tss at iki.fi
Sat Dec 8 11:08:24 EET 2012


On 7.12.2012, at 16.46, Jost Krieger wrote:

> I have a rather large and active mdbox (28 GB, 3M mess, 1200
> deliveries/day). I usually have no problems working with those mails,
> and there is some batch processing going on (via doveadm).
> 
> Every few weeks I try my luck running doveadm purge, and this
> a) crunches about 5GB (to be expected),
> b) takes rather long (ok),
> c) leads to long stretches of blocked mdbox, which is the problem.
> 
> I always turn off the batch processing, but deliveries take so long that
> they sometimes give up after timeout (they will come back later), and
> the IMAP clients get blocked for long minutes. Sometimes even the purge
> run aborts because of 3-minute-timeouts.
> 
> What could be going on here (2.1.10)?

The purging locks the mdbox only while it's writing to indexes, which should be a very short duration. The mdbox isn't locked while the m.* files are being read/written. What 3 minute timeout does purge complain about (exact error message)? Maybe get a strace output of the purge with "strace -tt -o log doveadm purge -u user at domain" and grep for SETLK in them to see how long the locks are being held.




More information about the dovecot mailing list