tcp_nodelay not being set on 14.04 under some situations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-swiftclient |
New
|
Undecided
|
Unassigned |
Bug Description
The code that actually sets this value is done by connection.py which lives under urllib3. I have found in some cases urllib3 is there but connection.py isn't and the way to tell is a 2K PUT is always faster than a 1K put since nagel adds an extra 40 msec latency. It also turns out that 200K PUTs are faster than 100K ones.
My biggest concern is applications that require high IOPS for small objects will perform poorly and nobody will ever know why as this is pretty subtle. I'm also concerned that benchmarks could be published with these numbers.
If you install python-swiftclient on a new system and look under requests/urllib3 connection.py is not there and so nagel will not be disabled! If you upgrade requests or even reinstall the same version (though reinstalls are not straightforward), connection.py appears and 1K PUTs run at the expected rates. It also turns out if you create a virtualenv and install swiftclient there, connection.py also appear.
To reproduce make sure connection.py isn't currently on the system and if it is, remove requests.
I'm not sure if there is anything that can be done in swiftclient itself to get around this, but ideally it would be great if it could detect connect.py is missing and throw a warning.
I have more information. There are different versions of urllib3 available and the latest deb package looks like 1.7.1 whereas the lastest with pip is 1.10.1 and it's 1.7.1 that doesn't yet contain connection.py and it's 1.7.1 that comes with 14.04. So perhaps part of the answer to reporting a problem might be for swiftclient to check the version of urllib3 that is installed?
-mark