[ 
https://issues.apache.org/jira/browse/QPID-3346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13131623#comment-13131623
 ] 

[email protected] commented on QPID-3346:
-----------------------------------------------------


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

Review request for qpid, Andrew Stitcher, Gordon Sim, and Chug Rolke.


Summary
-------

Two performance-related tweaks to message group code:
1) cache the last group lookup
2) use tr1::unordered_map rather than std::map for group identifier lookup - no 
need to keep the group id's in order.

Probably the most visible change would be for #2: the include path for 
unordered_map differs between gnu and windows - please see the included 
sys/unordered_map.h header for my "clever" work-around.


Simple benchmark before patch:

[root@mrg44 kgiusti]# qpid-cpp-benchmark -m 1000000 --content-size=8 --repeat=3 
--summarize --send-arg="--group-key=GROUP-ID" --send-arg="--group-size=11" 
--receive-option 
"node:{x-declare:{arguments:{qpid.group_header_key:GROUP-ID,qpid.shared_msg_group:1}}}"
 --senders=2 --receivers=2 --send-arg="--group-interleave=3"
send-tp         recv-tp l-min   l-max   l-avg
52863           52752   0.47    62.65   18.52
52437           52440   0.53    79.35   19.10
52042           52070   0.36    87.69   19.26

after patch:

[root@mrg44 kgiusti]# qpid-cpp-benchmark -m 1000000 --content-size=8 --repeat=3 
--summarize --send-arg="--group-key=GROUP-ID" --send-arg="--group-size=11" 
--receive-option 
"node:{x-declare:{arguments:{qpid.group_header_key:GROUP-ID,qpid.shared_msg_group:1}}}"
 --senders=2 --receivers=2 --send-arg="--group-interleave=3"
send-tp         recv-tp l-min   l-max   l-avg
55888           55842   0.68    84.53   17.37
55810           55784   0.46    85.09   17.23
54776           54750   0.36    77.25   17.46


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


Diffs
-----

  /trunk/qpid/cpp/src/Makefile.am 1186491 
  /trunk/qpid/cpp/src/qpid/broker/MessageGroupManager.h 1186491 
  /trunk/qpid/cpp/src/qpid/broker/MessageGroupManager.cpp 1186491 
  /trunk/qpid/cpp/src/qpid/sys/unordered_map.h PRE-CREATION 

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


Testing
-------

unit & benchmarking.


Thanks,

Kenneth


                
> Support message grouping with stricted sequence consumption across multiple 
> consumers.
> --------------------------------------------------------------------------------------
>
>                 Key: QPID-3346
>                 URL: https://issues.apache.org/jira/browse/QPID-3346
>             Project: Qpid
>          Issue Type: New Feature
>          Components: C++ Broker
>    Affects Versions: 0.12
>            Reporter: Ken Giusti
>            Assignee: Ken Giusti
>             Fix For: 0.14
>
>         Attachments: UI.txt, msg_groups_0.2.txt
>
>
> This feature is described in the attached QIP as Policy #2: Sequenced 
> Consumers.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to