[MERGE] A hack to make urllib not call recv(1) lots and lots.
John Arbash Meinel
john at arbash-meinel.com
Mon Mar 17 14:51:54 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andrew Bennetts wrote:
> Robert Collins wrote:
>> Oh, also - local tests without latency being added won't show the real
>> impact of changing recv() call sizes - keeping the buffer empty is
>> useful for high latency links.
>
> Hmm, I might try testing a few times over the internet then. I was hoping to
> avoid the variability of the conference network, but now it's the sprint days of
> PyCon that's probably not such a problem.
>
> -Andrew.
>
>
>
Well, you could always use 'netem' to configure a high latency link on
your own computer. I've used it before when testing stuff like 'bzr push'.
Add 50ms latency to the loopback (100ms round-trip ping time):
sudo tc qdisc add dev lo root netem delay 50ms
Restore it back to normal
sudo tc qdisc del dev lo root
X goes over Unix sockets so you don't have to worry about making
everything on your machine completely unusable.
It starts to get complex if you want to limit bandwidth, etc. But this
gives a pretty good way to give yourself a high-latency (very
high-bandwidth) connection without any other interference.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFH3oWJJdeBCYSNAAMRAnMUAJ43kH2cTa+3aoLSczfW3IGJrU9fhwCfRRVL
rWRDK/8iS8qS9QVBg/o1RiM=
=qpbK
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list