5

Ubuntu 12.04 LTS で gwan_linux64-bit.tar.bz2 を使用して gwan を解凍して実行する

次に、wrk をポイントします (null ファイル null.html を使用)

wrk --timeout 10 -t 2 -c 100 -d20s http://127.0.0.1:8080/null.html
Running 20s test @ http://127.0.0.1:8080/null.html
  2 threads and 100 connections
    Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    11.65s     5.10s   13.89s    83.91%
    Req/Sec     3.33k     3.65k   12.33k    75.19%
  125067 requests in 20.01s, 32.08MB read
  Socket errors: connect 0, read 37, write 0, timeout 49
Requests/sec:   6251.46
Transfer/sec:      1.60MB

.. パフォーマンスが非常に悪いです。実際、ある種の大きな遅延の問題があるようです。テスト中、gwan は 200% ビジーで、wrk は 67% ビジーです。

nginx を指すと、wrk は 200% ビジーで、nginx は 45% ビジーです。

wrk --timeout 10 -t 2 -c 100 -d20s http://127.0.0.1/null.html
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   371.81us  134.05us  24.04ms   91.26%
    Req/Sec    72.75k     7.38k  109.22k    68.21%
  2740883 requests in 20.00s, 540.95MB read
Requests/sec: 137046.70
Transfer/sec:     27.05MB

nginx で weighttpd を指すと、さらに高速な結果が得られます。

/usr/local/bin/weighttp -k -n 2000000 -c 500 -t 3 http://127.0.0.1/null.html
weighttp - a lightweight and simple webserver benchmarking tool

starting benchmark...
spawning thread #1: 167 concurrent requests, 666667 total requests
spawning thread #2: 167 concurrent requests, 666667 total requests
spawning thread #3: 166 concurrent requests, 666666 total requests
progress:   9% done
progress:  19% done
progress:  29% done
progress:  39% done
progress:  49% done
progress:  59% done
progress:  69% done
progress:  79% done
progress:  89% done
progress:  99% done

finished in 7 sec, 13 millisec and 293 microsec, 285172 req/s, 57633 kbyte/s
requests: 2000000 total, 2000000 started, 2000000 done, 2000000 succeeded, 0 failed, 0 errored
status codes: 2000000 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 413901205 bytes total, 413901205 bytes http, 0 bytes data

サーバーは仮想 8 コアの専用サーバー (ベアメタル) で、KVM の下にあります。

このプラットフォームで gwan が抱えている問題を特定するには、どこから始めればよいですか?

この同じ OS で lighttpd、nginx、および node.js をテストしましたが、結果はすべて予想どおりです。サーバーは、エフェメラル ポートの拡張、ulimit の増加、時間待機リサイクルの調整など、通常の方法で調整されています。

4

1 に答える 1