You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Benoit Tellier (Jira)" <se...@james.apache.org> on 2022/12/28 09:01:00 UTC

[jira] [Updated] (JAMES-3870) Each IMAP response line is a distinct TCP packet

     [ https://issues.apache.org/jira/browse/JAMES-3870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benoit Tellier updated JAMES-3870:
----------------------------------
    Attachment: pr-list-responses-without-flush.png
                master-list-responses-with-flush.png

> Each IMAP response line is a distinct TCP packet
> ------------------------------------------------
>
>                 Key: JAMES-3870
>                 URL: https://issues.apache.org/jira/browse/JAMES-3870
>             Project: James Server
>          Issue Type: Improvement
>          Components: IMAPServer
>            Reporter: Benoit Tellier
>            Priority: Major
>             Fix For: 3.8.0
>
>         Attachments: master-list-responses-with-flush.png, pr-list-responses-without-flush.png
>
>
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org