diff options
author | Alan Conway <aconway@apache.org> | 2011-09-06 21:46:25 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2011-09-06 21:46:25 +0000 |
commit | aa388eb275cc51b5a7189025c1702b828275eebe (patch) | |
tree | a0b912980e529b8b2f3620b90e592baf71385332 | |
parent | 2d1b6da0b7e613642a07d9ea6823f269ed12cae5 (diff) | |
download | qpid-python-aa388eb275cc51b5a7189025c1702b828275eebe.tar.gz |
QPID-2920: Sleep on cpg flow control to avoid thrashing.
Added a 1ms sleep when CPG is flow controlled. Huge thruput
improvement for qpid-cluster-benchmarks multi-host case.
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qpid-2920-1@1165880 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/src/qpid/cluster/exp/Multicaster.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/qpid/cpp/src/qpid/cluster/exp/Multicaster.cpp b/qpid/cpp/src/qpid/cluster/exp/Multicaster.cpp index bdf6c33387..cf8703ca59 100644 --- a/qpid/cpp/src/qpid/cluster/exp/Multicaster.cpp +++ b/qpid/cpp/src/qpid/cluster/exp/Multicaster.cpp @@ -65,6 +65,7 @@ Multicaster::sendMcast(const PollableEventQueue::Batch& buffers) { std::transform(i, j, ioVector.begin(), &bufToIov); if (!cpg.mcast(&ioVector[0], len)) { // CPG didn't send because of CPG flow control. + ::usleep(1000); // Don't spin too tightly. return i; } i = j; |