qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mgoul...@apache.org
Subject svn commit: r904588 - /qpid/trunk/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp
Date Fri, 29 Jan 2010 18:53:29 GMT
Author: mgoulish
Date: Fri Jan 29 18:53:28 2010
New Revision: 904588

URL: http://svn.apache.org/viewvc?rev=904588&view=rev
Log:
Change the heuristic used to alter the send estimate up and down.
Especially, change the starting estimate to be much higher than 1
message.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp?rev=904588&r1=904587&r2=904588&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp Fri Jan 29 18:53:28 2010
@@ -36,7 +36,7 @@
 NoOpConnectionOutputHandler OutputInterceptor::discardHandler;
 
 OutputInterceptor::OutputInterceptor(Connection& p, sys::ConnectionOutputHandler&
h)
-    : parent(p), closing(false), next(&h), sendMax(1), sent(0), sentDoOutput(false)
+    : parent(p), closing(false), next(&h), sendMax(2048), sent(0), sentDoOutput(false)
 {}
 
 void OutputInterceptor::send(framing::AMQFrame& f) {
@@ -80,7 +80,7 @@
         if (buffered == 0 && sent == sendMax) // Could have sent more, increase the
limit.
             newLimit = sendMax*2; 
         else if (buffered > 0 && sent > 1) // Data left unsent, reduce the
limit.
-            newLimit = sent-1;
+            newLimit = (sendMax + sent) / 2;
     }
     sent = 0;
     while (sent < limit && parent.getBrokerConnection().doOutput())



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message