swift/test/unit
Romain LE DISEZ 8378a11d11 Replace all "with Chunk*Timeout" by a watchdog
The contextmanager eventlet.timeout.Timeout is scheduling a call to
throw an exception every time is is entered. The swift-proxy uses
Chunk(Read|Write)Timeout for every chunk read/written from the client or
object-server. For a single upload/download of a big object, it means
tens of thousands of scheduling in eventlet, which is very costly.

This patch replace the usage of these context managers by a watchdog
greenthread that will schedule itself by sleeping until the next timeout
expiration. Then, only if a timeout expired, it will schedule a call to
throw the appropriate exception.

The gain on bandwidth and CPU usage is significant. On a benchmark
environment, it gave this result for an upload of 6 Gbpson a replica
policy (average of 3 runs):
    master: 5.66 Gbps / 849 jiffies consumed by the proxy-server
    this patch: 7.56 Gbps / 618 jiffies consumed by the proxy-server

Change-Id: I19fd42908be5a6ac5905ba193967cd860cb27a0b
2020-04-02 07:38:47 -04:00
..
account Merge "account-server: Add test for leading delimiter" 2020-01-17 01:38:06 +00:00
cli print deleted flag in account and container info cli 2019-11-08 12:03:20 +00:00
common Replace all "with Chunk*Timeout" by a watchdog 2020-04-02 07:38:47 -04:00
container Stop retrying every deletes in container-sync 2020-01-20 22:06:44 -08:00
obj Merge "Lower the log level for falling back to mkstemp" 2020-02-15 02:35:29 +00:00
proxy Replace all "with Chunk*Timeout" by a watchdog 2020-04-02 07:38:47 -04:00
test_locale py3: port the test of locale 2019-06-19 09:54:14 -07:00
__init__.py Drop use of unittest2 2020-01-12 03:13:41 -06:00
helpers.py Allow internal clients to use reserved namespace 2019-11-27 11:22:00 -06:00