Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
- Why
IMAP clients performs a GETQUOTAROOT command for each mailboxes.
Untagged responses also include the actual quota; we end up because of IMAP design reading the quotas for each mailboxes! This is an issue eg when a given user have hundreds of mailboxes! (Who said IMAP is a BAD protocol?)
- How
While patching IMAP design is not doable, we can optimize our queries to reduce our query count: storage and count quota parts (current usage, max user storage, max domain storage) are hosted on the same row, that we are reading two times due to bad readpath design.
Unlocking grouped read for collocated data would likely make this much less of an issue.
*Definition of done*: GetQuotaRoot cassandra query volume should be reduced of 40%
Glowroot captures attached. The first shows queries executed by GetQuotaroot, as well as the percentage of total IMAP time spent on GetQuotaRoot queries resolution.
As a comparison the second capture shows all the IMAP queries being issued...
- Impact
Note that this work would also enhance slightly append speed (SMTP, IMAP append, etc) as quota needs to be checked, backend quota processing (quota updated events are less expensive to generate), and will slightly help regarding JMAP Mailbox/get call (which reads the quota). Though the enhancement would be less noticeable than for GetQuotaRoot IMAP command.