Red Hat Bugzilla – Bug 860700
QMF queries for HA replication take too long to process
Last modified: 2015-01-21 07:54:47 EST
Description of problem:
In an HA broker with approximately 12,000 queues, it takes roughly 10-14 seconds for the the first QMF queue query response fragment to arrive. While the QMF management agent is collecting the response, all other QMF-related functionality is blocked -- which will block any thread that raises a QMF event.
Not only will this result in clients getting disconnected from the broker due to worker threads being blocked by QMF (either due to missed heartbeats in an extreme case or from the 2 second handshake timeout), this also results in the HA backup's federated link getting disconnected due to missed heartbeats when the link heartbeat interval is set to a low value.
If the HA backup loses its connection, it only exacerbates the issue since it will reconnect and re-query the QMF data that made it lose its connection in the first place.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Start-up an HA primary and backup broker with a small link heartbeat interval (10 seconds)
2. Connect 6000 clients, each creating 2 replicated queues
3. Request a QMF queue reroute for all queues from a single client
All broker worker threads become temporarily blocked against ManagementAgent::userLock. This will result in the federated link timing out due to missed heartbeats which results in the backup broker reconnecting and re-issuing QMF queries (which will be blocked by userLock) -- this cycle of the backup reconnecting repeats.
QMF can gracefully handle the large number of events and requests.
Jason -- Do you still have some code sitting around that I could use to see exactly what you did? Especially for steps 2 & 3 of your "steps to reproduce".
I checked and unfortunately I do not have any reproducer available for this issue. I encountered this issue indirectly while testing a heavily loaded HA broker (in terms of the number of connected clients and number of queues) and we no longer have access to the testing environment where we originally witnessed the issue.
Created attachment 790652 [details]
One script, two cpp programs, and a README.
Please see my attachment for a big, mean reproducer.
And if you want to try it, look at the README first -- you might need to find a bigger box to run it on.
Since this BZ was reported against development, I used the same sets of packages both for the before-fix and after-fix tests. ( See package list below. )
Only the qpid source tree changed. The qpidd broker I used in the before-fix tests was from that source-build ( svn version r1398529 ). Also, my clients were built against libraries from that source-build.
In the after-fix tests I used qpidd from the installed packages below, and built my clients against the installed libraries. )
The time measured before the fix was 240 seconds.
Time measured after the fix was 1.58 seconds.
package list cyrus-sasl-2.1.23-13.el6_3.1.x86_64