Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8161004

Bulk sending WindowUpdate frame speedup HTTP/2 performance up to 18x times and improve scalability

    XMLWordPrintable

    Details

      Description

      Current HTTP/2 implementation sends WindowUpdate frame each time when data frame is processed. That leads to network saturation and oversynchronization on "Http2Connection.sendlock".

      In case of getting small data (less than max frame size) we get 55% of blocks on sendWindowUpdate (and only 37% on sendHeaders).
      Even in case of getting large data (1Mbytes) - 18% of all blocks is caused by sendWindowUpdate.

      Suggested performance improvement provides 2x-18x performance speedup.
      Implemented optimizations:
      1. Accumulate size of received data and send bulk WindowUpdate when some watermark is reached.
      2. Don't send stream WindowUpdate when the last data frame is received (set flag END_STREAM)
      3. WindowUpdate frame goes directly to HttpConnection bypassing Http2Connection.sendlock. That is allowed with proper protection for "do not insert WindowUpdate frame between Headers and Continuation frames".

      webrev: http://cr.openjdk.java.net/~skuksenko/jep110/8161004/

        Attachments

        1. size1.png
          size1.png
          31 kB
        2. size128K.png
          size128K.png
          28 kB
        3. size1M.png
          size1M.png
          32 kB

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              skuksenko Sergey Kuksenko
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: