Accelerating push via bzr:// and friends

Martin Pool mbp at canonical.com
Wed May 21 02:12:00 BST 2008


On Tue, May 20, 2008 at 8:10 PM, Robert Collins
<robertc at robertcollins.net> wrote:
> On Tue, 2008-05-20 at 19:47 +1000, Andrew Bennetts wrote:
>> Here's a couple of things I'm doing right now, because I know other
>> some other
>> people are looking at similar areas and it would be good to avoid
>> duplicating
>> our efforts:
>>
>>  - buffering in _ProtocolThreeEncoder.  For some reason setting
>> TCP_NODELAY
>>    isn't enough to avoid waiting for ACKs when doing lots of small
>> writes.  So
>>    I'll make it buffer so that it does exactly one send() call for
>> most packets
>>    (unless they have a streamed body).
>
> NODELAY stops the kernel buffering, so you get lots of packets on the
> wire; otoh it means when we are being chatty we don't have to wait.
> Perhaps we don't want NODELAY?

SO_NODELAY does not afaik change any behaviour to do with waiting for
acks, but only as Robert indicates changes transmission buffering.  I
don't think we would want it on in our case.

I think we are using Python file objects to send and receive, so
rather than buffering ourself we should make sure their buffering is
turned on, and then just flush them when we have finished sending the
message.

-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list