Qpid
  1. Qpid
  2. QPID-3841

Improve batching of writes for outbound messages.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.15
    • Fix Version/s: 0.15
    • Component/s: C++ Broker
    • Labels:
      None

      Description

      A patch created by Gordon Sim will allow the connection to batch up outbound messages, resulting in less calls to the socket's write method (as more data is passed with each write).

      This results in a small performance improvement. For example, given a broker with a single queue (flow control disabled), qpid-send filling it and qpid-receive draining it simultaineously with 300 byte messages:

      Pre-patch:
      qpid-send= 77581 msg/sec
      qpid-receive= 77345 msg/sec

      Post-patch:
      qpid-send= 84931 msg/sec
      qpid-receive= 84789 msg/sec

        Activity

        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/3897/
        -----------------------------------------------------------

        Review request for qpid, Andrew Stitcher, Alan Conway, and Gordon Sim.

        Summary
        -------

        Patch provided by Gordon that improves the coalescing of outbound message buffers.

        This addresses bug qpid-3841.
        https://issues.apache.org/jira/browse/qpid-3841

        Diffs


        /trunk/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp 1230550

        Diff: https://reviews.apache.org/r/3897/diff

        Testing
        -------

        unit test pass, including cluster tests.

        Thanks,

        Kenneth

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3897/ ----------------------------------------------------------- Review request for qpid, Andrew Stitcher, Alan Conway, and Gordon Sim. Summary ------- Patch provided by Gordon that improves the coalescing of outbound message buffers. This addresses bug qpid-3841. https://issues.apache.org/jira/browse/qpid-3841 Diffs /trunk/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp 1230550 Diff: https://reviews.apache.org/r/3897/diff Testing ------- unit test pass, including cluster tests. Thanks, Kenneth
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/3897/#review5095
        -----------------------------------------------------------

        /trunk/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp
        <https://reviews.apache.org/r/3897/#comment11177>

        nit - Unecessary braces, the lock scope is till the end of the if in any case

        Also a comment here explaining why would be good, perhaps:

        "// Need to get any new frames into the work queue"

        • Andrew

        On 2012-02-14 21:21:05, Kenneth Giusti wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/3897/

        -----------------------------------------------------------

        (Updated 2012-02-14 21:21:05)

        Review request for qpid, Andrew Stitcher, Alan Conway, and Gordon Sim.

        Summary

        -------

        Patch provided by Gordon that improves the coalescing of outbound message buffers.

        This addresses bug qpid-3841.

        https://issues.apache.org/jira/browse/qpid-3841

        Diffs

        -----

        /trunk/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp 1230550

        Diff: https://reviews.apache.org/r/3897/diff

        Testing

        -------

        unit test pass, including cluster tests.

        Thanks,

        Kenneth

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3897/#review5095 ----------------------------------------------------------- /trunk/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp < https://reviews.apache.org/r/3897/#comment11177 > nit - Unecessary braces, the lock scope is till the end of the if in any case Also a comment here explaining why would be good, perhaps: "// Need to get any new frames into the work queue" Andrew On 2012-02-14 21:21:05, Kenneth Giusti wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3897/ ----------------------------------------------------------- (Updated 2012-02-14 21:21:05) Review request for qpid, Andrew Stitcher, Alan Conway, and Gordon Sim. Summary ------- Patch provided by Gordon that improves the coalescing of outbound message buffers. This addresses bug qpid-3841. https://issues.apache.org/jira/browse/qpid-3841 Diffs ----- /trunk/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp 1230550 Diff: https://reviews.apache.org/r/3897/diff Testing ------- unit test pass, including cluster tests. Thanks, Kenneth
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/3897/#review5096
        -----------------------------------------------------------

        Ship it!

        Aside from the noted nits, it seems a good improvement

        • Andrew

        On 2012-02-14 21:21:05, Kenneth Giusti wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/3897/

        -----------------------------------------------------------

        (Updated 2012-02-14 21:21:05)

        Review request for qpid, Andrew Stitcher, Alan Conway, and Gordon Sim.

        Summary

        -------

        Patch provided by Gordon that improves the coalescing of outbound message buffers.

        This addresses bug qpid-3841.

        https://issues.apache.org/jira/browse/qpid-3841

        Diffs

        -----

        /trunk/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp 1230550

        Diff: https://reviews.apache.org/r/3897/diff

        Testing

        -------

        unit test pass, including cluster tests.

        Thanks,

        Kenneth

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3897/#review5096 ----------------------------------------------------------- Ship it! Aside from the noted nits, it seems a good improvement Andrew On 2012-02-14 21:21:05, Kenneth Giusti wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3897/ ----------------------------------------------------------- (Updated 2012-02-14 21:21:05) Review request for qpid, Andrew Stitcher, Alan Conway, and Gordon Sim. Summary ------- Patch provided by Gordon that improves the coalescing of outbound message buffers. This addresses bug qpid-3841. https://issues.apache.org/jira/browse/qpid-3841 Diffs ----- /trunk/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp 1230550 Diff: https://reviews.apache.org/r/3897/diff Testing ------- unit test pass, including cluster tests. Thanks, Kenneth
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/3897/#review5098
        -----------------------------------------------------------

        Ship it!

        • Alan

        On 2012-02-14 21:21:05, Kenneth Giusti wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/3897/

        -----------------------------------------------------------

        (Updated 2012-02-14 21:21:05)

        Review request for qpid, Andrew Stitcher, Alan Conway, and Gordon Sim.

        Summary

        -------

        Patch provided by Gordon that improves the coalescing of outbound message buffers.

        This addresses bug qpid-3841.

        https://issues.apache.org/jira/browse/qpid-3841

        Diffs

        -----

        /trunk/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp 1230550

        Diff: https://reviews.apache.org/r/3897/diff

        Testing

        -------

        unit test pass, including cluster tests.

        Thanks,

        Kenneth

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3897/#review5098 ----------------------------------------------------------- Ship it! Alan On 2012-02-14 21:21:05, Kenneth Giusti wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3897/ ----------------------------------------------------------- (Updated 2012-02-14 21:21:05) Review request for qpid, Andrew Stitcher, Alan Conway, and Gordon Sim. Summary ------- Patch provided by Gordon that improves the coalescing of outbound message buffers. This addresses bug qpid-3841. https://issues.apache.org/jira/browse/qpid-3841 Diffs ----- /trunk/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp 1230550 Diff: https://reviews.apache.org/r/3897/diff Testing ------- unit test pass, including cluster tests. Thanks, Kenneth
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/3897/#review5104
        -----------------------------------------------------------

        Ship it!

        Note: this is really a fix to a much earlier regression.

        • Gordon

        On 2012-02-14 21:21:05, Kenneth Giusti wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/3897/

        -----------------------------------------------------------

        (Updated 2012-02-14 21:21:05)

        Review request for qpid, Andrew Stitcher, Alan Conway, and Gordon Sim.

        Summary

        -------

        Patch provided by Gordon that improves the coalescing of outbound message buffers.

        This addresses bug qpid-3841.

        https://issues.apache.org/jira/browse/qpid-3841

        Diffs

        -----

        /trunk/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp 1230550

        Diff: https://reviews.apache.org/r/3897/diff

        Testing

        -------

        unit test pass, including cluster tests.

        Thanks,

        Kenneth

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3897/#review5104 ----------------------------------------------------------- Ship it! Note: this is really a fix to a much earlier regression. Gordon On 2012-02-14 21:21:05, Kenneth Giusti wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3897/ ----------------------------------------------------------- (Updated 2012-02-14 21:21:05) Review request for qpid, Andrew Stitcher, Alan Conway, and Gordon Sim. Summary ------- Patch provided by Gordon that improves the coalescing of outbound message buffers. This addresses bug qpid-3841. https://issues.apache.org/jira/browse/qpid-3841 Diffs ----- /trunk/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp 1230550 Diff: https://reviews.apache.org/r/3897/diff Testing ------- unit test pass, including cluster tests. Thanks, Kenneth
        Hide
        Andrew Stitcher added a comment -

        This patch produces a larger improvement for 1k messages:
        (on my laptop)
        from 93k -> 115k msg/s (20-25%)

        Show
        Andrew Stitcher added a comment - This patch produces a larger improvement for 1k messages: (on my laptop) from 93k -> 115k msg/s (20-25%)

          People

          • Assignee:
            Ken Giusti
            Reporter:
            Ken Giusti
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development