-
Notifications
You must be signed in to change notification settings - Fork 11
/
post.txt
18 lines (9 loc) · 2.81 KB
/
post.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Hello everyone.
Since `Mozilla announced funding,`_ we've been working quite hard on delivering you a working Python 3.5.
To cut a long story short, we have some benchmarks done by Paweł Piotr Przeradowski @squeaky_pl for an HTTP workload on a number of asynchronous IO libraries -- the relatively new asyncio and curio libraries, and the battle-tested tornado, gevent and Twisted libraries. To see the benchmarks, check out https://github.com/squeaky-pl/zenchmarks, which also contains a README.md with instructions for reproducing the results. Raw results can be obtained directly from https://github.com/squeaky-pl/zenchmarks/blob/master/results.csv.
The purpose of the presented benchmarks is to show that the upcoming PyPy release is already working with unmodified code that runs on CPython 3.5. PyPy also already manages to make them run significantly faster.
The benchmarks consist of HTTP servers implemented on the top of the aforementioned libraries. All the servers are single-threaded, relying on underlying event loops to provide concurrency. Access logging was disabled to exclude terminal I/O from the results. The "request logic" in the view consists of a lookup in a dictionary mapping ASCII letters to verses from the famous Zen of Python. If a verse is found, it is returned in the view, otherwise a 404 Not Found response is served. The 400 Bad Request and 500 Internal Server Error cases are also handled.
The workload was generated with the wrk[https://github.com/wg/wrk] HTTP benchmarking tool. wrk is run with one thread, opening up to 100 concurrent connections for 2 seconds, and repeated 10 times for stability. There is a Lua script provided[https://github.com/squeaky-pl/zenchmarks/blob/master/zenhttp.lua] that instructs wrk to continously send 24 different requests that hit different execution paths (200, 404, 400) in the view code. It is also worth noting that wrk will only count 200 responses as successful, so the actual request per second throughput is higher than the absolute number reported.
For convenience, all libraries and their dependencies are vendored[https://github.com/squeaky-pl/zenchmarks/tree/master/vendor] into the benchmark repository. There is also a precompiled portable version of wrk provided that should run on any reasonably recent (10 year old or newer) Linux x86_64 distribution. The benchmark was performed on a public cloud scaleway[https://www.scaleway.com/] x6 x86_64 server launched in the Paris data center. The server was running Ubuntu 16.04.01 LTS and reported an Intel(R) Xeon(R) CPU D-1531 @ 2.20GHz CPU. CPython 3.5.2 (shipped by default in Ubuntu) was benchmarked against the pypy-c-jit-90326-88ef793308eb-linux64[http://buildbot.pypy.org/nightly/py3.5/pypy-c-jit-90326-88ef793308eb-linux64.tar.bz2] nightly snapshot of the PyPy 3.5 compatibility branch.
[benchmark graphs go here]
Overall