OS XでPython asyncioのパフォーマンスに問題があります。Macbook pro 2015に16GBのRAMがあります。しかし、OS X(エルキャピタン)でUbuntuと同じパフォーマンスを得ることはできません。私がOS XのホストでVM(迷惑メール、4GBのRAM)内でUbuntuを実行しているという事実を考えても。 WRKとOS XとUbuntuのPython asyncioパフォーマンス
OS Xベンチマーク: wrk -t8 -d 10s -c 300 http://127.0.0.1:9090 ⏎ Running 10s test @ http://127.0.0.1:9090 8 threads and 300 connections Thread Stats Avg Stdev Max +/- Stdev Latency 628.63us 1.45ms 16.32ms 89.46% Req/Sec 696.05 834.65 5.51k 88.89% 19498 requests in 10.08s, 361.78KB read Socket errors: connect 0, read 20482, write 0, timeout 0 Requests/sec: 1934.40 Transfer/sec: 35.89KB
のUbuntu:
wrk -t8 -d 10s -c 300 http://127.0.0.1:9090 Running 10s test @ http://127.0.0.1:9090 8 threads and 300 connections Thread Stats Avg Stdev Max +/- Stdev Latency 5.49ms 14.33ms 408.97ms 99.22% Req/Sec 3.58k 1.41k 8.42k 70.91% 204333 requests in 10.06s, 3.70MB read Socket errors: connect 0, read 3, write 977, timeout 0 Requests/sec: 20311.64 Transfer/sec: 376.88KB
Serverコード:Ubuntuの上https://gist.github.com/ssbb/5f6c2c043880e0e917c3254d06c52a7e
ulimit -a
:https://gist.github.com/ssbb/e468b3ede5470da25699e4da4506b77c
OS X上の:OS X上https://gist.github.com/ssbb/f2a846975069a1d62a313790ad8d26ce
sysctl -a
:Ubuntuの上https://gist.github.com/ssbb/c78d5da7ae9e3670175f643309cf9f6b
sysctl -a
:私はまた、私はアーチの上にこのサーバを実行しようとしたUbuntuの/ OS Xの間にそれほど差があるのはなぜhttps://gist.github.com/ssbb/9a00cc3856135369b16ddc0083d2bc88
Linux(VMではなく、2番目のOS)で、OS Xと同じ結果が得られます。
UbuntuにはTCPスタックの「ハック」がありますか?