diff options
author | Michael Goulish <mgoulish@apache.org> | 2010-01-29 18:53:28 +0000 |
---|---|---|
committer | Michael Goulish <mgoulish@apache.org> | 2010-01-29 18:53:28 +0000 |
commit | 576ca5afb5d8016bbaad44db260124be029ce145 (patch) | |
tree | 1bdc4a4c0ab82df6721ac23468b402f10decc73d /cpp | |
parent | 699c1f6e80452299ba7d014e7d23b664068d4cff (diff) | |
download | qpid-python-576ca5afb5d8016bbaad44db260124be029ce145.tar.gz |
Change the heuristic used to alter the send estimate up and down.
Especially, change the starting estimate to be much higher than 1
message.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@904588 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/qpid/cluster/OutputInterceptor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/qpid/cluster/OutputInterceptor.cpp b/cpp/src/qpid/cluster/OutputInterceptor.cpp index cb75fe5561..f80eb9c434 100644 --- a/cpp/src/qpid/cluster/OutputInterceptor.cpp +++ b/cpp/src/qpid/cluster/OutputInterceptor.cpp @@ -36,7 +36,7 @@ using namespace std; 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 @@ void OutputInterceptor::deliverDoOutput(uint32_t limit) { 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()) |