On 12.9.2012, at 1.21, Gábor Lénárt wrote:
I'm planning to activate quota control in dovecot, with maildir quota backend. I have about 70k users in my system directed to 4 backend servers (with a director to ensure that a user is always directed to the same server).
I have tried to activate it in one of my nodes. The problem is that load of it has increase a lot, as much as the system was unusable (maildir is in nfs storage, with indexes in local disks).
What do you think is the best to activate it?
Use dict-file quota instead of Maildir++ quota.
Sorry to jump into this topic, but can I ask why? Is dict quota is superior over Maildir++ quota in performance in general or it is "only" about the fact, that it's better in the case like above: activating the quota for many users later than the creation of the server itself?
Activating quota is equally slow, because it needs to scan sizes of all files. If the size is stored in maildir filename (,S=123) this is pretty fast, otherwise it's pretty slow because Dovecot stat()s the files, but afterwards it stores them to dovecot-uidlist file. So the main difference is that Maildir++ requires rescanning the quota periodically, while dict quota never rescans unless you run doveadm quota rescan.