Red Hat Bugzilla – Bug 860701
QMF queries for HA replication take too long to process
Last modified: 2013-03-19 12:39:29 EDT
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.
Created attachment 617570 [details]
Quick patch to greatly reduce lock contention within QMF
Created attachment 619735 [details]
Additional fixes to Jason's patch
This patch is Jason's patch plus some extra fixes that I think are necessary.