From 2acf99898514e6c44c8817f2962a64258c6e301a Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Mon, 25 Jul 2011 13:12:19 +0000 Subject: 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@1150684 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/cluster/exp/Multicaster.cpp | 1 + 1 file changed, 1 insertion(+) 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; -- cgit v1.2.1