[
https://issues.apache.org/jira/browse/PROTON-2353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17310649#comment-17310649
]
Ken Giusti commented on PROTON-2353:
------------------------------------
To reproduce the issue I've created a single router deployment with one
(reactor based) sender and one (reactor base) receiver. Both are written in C.
Here is the router's configuration:
[^qdrouterd.conf]
The clients can be found here:
Sender:
[throughput-sender.c|https://github.com/kgiusti/dispatch-tester/blob/master/benchmarks/clients/src/throughput-sender.c]
Receiver:
[throughput-receiver.c|https://github.com/kgiusti/dispatch-tester/blob/master/benchmarks/clients/src/throughput-receiver.c]
Fire up the qdrouter with the supplied configuration: "qdrouterd -c
qdrouterd.conf"
Start the receiver (receives forever): "throughput-receiver -c 0"
Start the sender: "throughput-sender -c 50000 -sx" - this will send 50,000
1MB messages
Note the cpu utilization of throughput-sender. It should be fairly close to
100%. Note the CPU utilization of the qdrouterd and the receiver - hardly
running.
Re-run the test after commenting out the "maxSessionFrames: 600" entry in the
qdrouterd.conf. Note the throughput and CPU utilization.
In my test environment I can push maxSessionFrames as high as 16200 before I
see the sender CPU drop off significantly and the throughput increase to about
baseline.
> Client becomes cpu bound in pn_buffer_rotate() on session flow control
> ----------------------------------------------------------------------
>
> Key: PROTON-2353
> URL: https://issues.apache.org/jira/browse/PROTON-2353
> Project: Qpid Proton
> Issue Type: Bug
> Components: proton-c
> Affects Versions: proton-c-0.33.0
> Reporter: Ken Giusti
> Priority: Major
> Fix For: proton-c-0.34.0
>
> Attachments: big-session.svg, qdrouterd.conf, small-session.svg
>
>
> While testing various AMQP session size limitations on the Qpid dispatch
> router I was able to cause a proton-c client to pin the CPU at 100% while in
> pn_buffer_rotate().
> This appears to be caused by lowering the incoming session window to a point
> where session flow control activates. In the case of my reproducer I'm
> setting the window size to approx 600 16K frames ~9.8MB. The client is
> sending ~1MB messages with a credit window of 250.
>
> See the attached flamegraphs of the sending client:
> First - this is baseline, no session limit (default provided by proton):
> [^big-session.svg]
>
> This flamegraph shows the client's behavior with a session limit of 9.8MB:
> [^small-session.svg]
>
> See comment for reproducer.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]