Martin Pool wrote:
> 2009/12/23 Robert Collins <email address hidden>:
>> You may be measuring the size of the pipe buffer, not of ssh's buffer
>> itself.
>
> In my tests, linux pipe buffers are about 128k - but ssh may be
> changing it somehow.
>
>
I'm testing between chinstrap and my home machine. If I run the test
locally with:
It shows that the writer has 2 64k writes that get loaded up before the
reader blocks it. So Martin's 128kB comment fits.
However, even if ssh is simply increasing its pipe buffer, that is still
sufficient for *bzr*. Namely, it is ssh's job to poll the socket and
make sure it keeps putting the bytes out. And it tells us that we can
write 1-2MB to ssh before it blocks. Which to me means:
We should write when we can, and not try to buffer too much. We can
trust that ssh will do a decent amount of buffering. I don't think this
means we should write a single byte at a time, but a 64kB buffer
actually sounds reasonable. So when we get a bit, ssh can start putting
it on the wire, and we can keep producing more data.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Pool wrote:
> 2009/12/23 Robert Collins <email address hidden>:
>> You may be measuring the size of the pipe buffer, not of ssh's buffer
>> itself.
>
> In my tests, linux pipe buffers are about 128k - but ssh may be
> changing it somehow.
>
>
I'm testing between chinstrap and my home machine. If I run the test
locally with:
wbzr serve --inet <request.txt | python read_and_sleep.py
It shows that the writer has 2 64k writes that get loaded up before the
reader blocks it. So Martin's 128kB comment fits.
However, even if ssh is simply increasing its pipe buffer, that is still
sufficient for *bzr*. Namely, it is ssh's job to poll the socket and
make sure it keeps putting the bytes out. And it tells us that we can
write 1-2MB to ssh before it blocks. Which to me means:
We should write when we can, and not try to buffer too much. We can
trust that ssh will do a decent amount of buffering. I don't think this
means we should write a single byte at a time, but a 64kB buffer
actually sounds reasonable. So when we get a bit, ssh can start putting
it on the wire, and we can keep producing more data.
John enigmail. mozdev. org/
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAks xgmcACgkQJdeBCY SNAAN8vQCg1nRda A1YsvLgS3s9NT3c 4ZlN ttSXBKoXsSbQ7kc MD
vkoAnRbahZAsoLo
=cQcy
-----END PGP SIGNATURE-----