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

Each IMAP response line is a distinct TCP packet

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.8.0
    • IMAPServer
    • None

    Description

      Today each Imap response line is transmitted in a distinct TCP packet.

      This causes a lot of network overhead as
      => TCP headers are added for each response line. To give an idea a LIST response line is 35 bytes long but result in a 101 bytes TCP frame so a 188% overcost....
      => TCP ack are conducted for each line independently. An ACK is 66 bytes,

      This is especially problematic for LIST, FETCH commands that actually result in many (100, 1000, maybe millions) response lines.

      See attach screenshot: master-list-responses-with-flush.png demonstrating this.

      We should try to limit the calls to "flush" with Netty, and force the flush only once per IMAP command (at the end of processing). Netty is free to transmit some data earlier if it's buffer states requires it.

      The entire mailbox list take 1 packet to transmit (1420 btes total for 41 mailboxes so ~35 bytes per mailbox) and a single ACK (66 bytes).

      See attach screenshot: pr-list-responses-without-flush.png demonstrating this.

      Attachments

        1. master-list-responses-with-flush.png
          453 kB
          Benoit Tellier
        2. pr-list-responses-without-flush.png
          317 kB
          Benoit Tellier

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h