abテスト
druby化前
Concurrency Level: 1
Time taken for tests: 70.65939 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 14341800 bytes
HTML transferred: 14311700 bytes
Requests per second: 1.43 [#/sec] (mean)
Time per request: 700.659 [ms] (mean)
Time per request: 700.659 [ms] (mean, across all concurrent requests)
Transfer rate: 199.88 [Kbytes/sec] received
druby化後
Concurrency Level: 1
Time taken for tests: 8.201422 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 14344200 bytes
HTML transferred: 14311700 bytes
Requests per second: 12.19 [#/sec] (mean)
Time per request: 82.014 [ms] (mean)
Time per request: 82.014 [ms] (mean, across all concurrent requests)
Transfer rate: 1708.00 [Kbytes/sec] received
9倍早くなっていたようだ。
ただ、この手の問題ってfcgiで解決できるような気もするんだよなぁ。でもfcgiはプロセス生成のコストを減らすだけだし、ライブラリ読み込みの遅さは解決できない気もする。
drubyでサーバを書くのはいいのだが、このサーバが落ちた場合の対処も面倒そうだ。さて、どうするか