Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-3458

[IMAP] GetQuotaRoot commands is issuing more than 10% of cassandra qurey time!

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.6.0
    • cassandra, IMAPServer

    Description

      1. 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?)

      1. 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...

      1. 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            btellier Benoit Tellier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: