Bug 1039581

Summary: [amqp1.0] performance on creating the endpoints
Product: Red Hat Enterprise MRG Reporter: Petr Matousek <pematous>
Component: qpid-cppAssignee: Gordon Sim <gsim>
Status: NEW --- QA Contact: Messaging QE <messaging-qe-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: DevelopmentCC: gsim, iboverma, jross
Target Milestone: 3.3Keywords: Performance
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Petr Matousek 2013-12-09 14:05:09 UTC
Description of problem:

The amqp1.0 protocol seems to have better performance when sending/receiving messages if the endpoints are already established. Which is most probably the most of the use cases. That is good.

On the other hand establishing the 1.0 endpoints (connection/session/sender/receiver) takes significantly more time than when using amqp0-10 (ie. 10 times more, see below). 

Also the 0-10 clients shows consistent execution time while the execution time of 1.0 clients significantly differs (when re-executing the client several times).

Since there is a Vienna requirement - AMQP-1500: No Performance Degradation, I'm raising this issue to highlight the current behavior. I'm not necessarily requesting a fix for this issue, but I want to let the developers think about/make aware of that fact.

Please see additional info for more details.

Version-Release number of selected component (if applicable):
qpid-cpp-*-0.22-29

How reproducible:
100%

Steps to Reproduce:
1. see additional info

Additional info:

___The amqp1.0 protocol seems to have better performance when sending/receving messages if the endpoints are already established___:

# content=$(openssl rand -hex 2047)
# time /var/dtests/node_data/clients/qc2_spout --connection-options "{protocol: 'amqp0-10'}" -c 10000000 --content ${content} amq.direct >/dev/null; 


real	 23m32.117s
user	 8m54.179s
sys	 7m37.434s

# time /var/dtests/node_data/clients/qc2_spout --connection-options "{protocol: 'amqp1.0'}" -c 10000000 --content ${content} amq.direct >/dev/null;

real	 17m56.056s
user	 6m18.512s
sys	 4m0.415s

___On the other hand establishing the endpoints (Connection/session/sender/receiver) takes significantly more time than when using amqp0-10___:


# time for i in $(seq 1 20); do /var/dtests/node_data/clients/qc2_spout --connection-options "{protocol: 'amqp0-10'}" -c 1 --content ${content} amq.direct >/dev/null; done

real	0m0.546s
user	0m0.379s
sys	0m0.140s
[root /var/dtests/node_data/clients]# time for i in $(seq 1 20); do /var/dtests/node_data/clients/qc2_spout --connection-options "{protocol: 'amqp1.0'}" -c 1 --content ${content} amq.direct >/dev/null; done

real 	0m1.384s
user 	0m0.431s
sys	0m0.142s

The following command creates 500 connections to the broker:
# time ./qc2_connector -c 500 --connection-options "{protocol: 'amqp0-10'}" --obj-ctrl "C"
500 0 500

real 	0m0.843s
user	0m0.170s
sys	0m0.407s

# time ./qc2_connector -c 500 --connection-options "{protocol: 'amqp1.0'}" --obj-ctrl "C"
500 0 500

real	0m8.587s
user	0m0.241s
sys	0m0.414s

The following command list various objects using qmf:
# time for i in $(seq 1 20); do /var/dtests/node_data/clients/qmf2_list_objects 1>/dev/null; done

real	0m0.651s
user	0m0.375s
sys	0m0.159s
# time for i in $(seq 1 20); do /var/dtests/node_data/clients/qmf2_list_objects  --connection-options "{protocol: 'amqp1.0'}" 1>/dev/null; done

real	0m6.290s
user	0m0.557s
sys	0m0.237s

__the execution time when using amqp1.0 reports unstable results __:

(the command creates 1000 Senders and 1000 Receivers on 1000 sEssions on 1000 Connections)
# time ./qc2_connector -c 1000 --connection-options "{protocol: 'amqp1.0'}" --obj-ctrl "CESR"
1000 0 1000

real 	0m2.738s
user	0m0.438s
sys	0m0.590s
# time ./qc2_connector -c 1000 --connection-options "{protocol: 'amqp1.0'}" --obj-ctrl "CESR"
1000 0 1000

real	0m21.769s
user	0m0.433s
sys	0m0.609s