swift/test/unit/proxy
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
..
controllers Merge "sharding: filter shards based on prefix param when listing" 2020-03-05 06:53:05 +00:00
__init__.py Initial commit of Swift code 2010-07-12 17:03:45 -05:00
test_mem_server.py Fix socket leak on object-server death 2019-01-31 18:38:35 +00:00
test_server.py Replace all "with Chunk*Timeout" by a watchdog 2020-04-02 07:38:47 -04:00
test_sysmeta.py py3: port unit/proxy/test_sysmeta.py 2019-05-05 05:06:54 +00:00