公式サイトを見て、MaxProcessCountを5くらいにしてみる(デフォルトは1000なのに5かぁ…)
で、並列にリクエストを投げる(ab2 -n 10 -c 10)
Concurrency Level: 10
Time taken for tests: 3.613000 seconds
Complete requests: 10
Failed requests: 0
Write errors: 0
Total transferred: 333760 bytes
HTML transferred: 331060 bytes
Requests per second: 2.77 [#/sec] (mean)
Time per request: 3613.000 [ms] (mean)
Time per request: 361.300 [ms] (mean, across all concurrent requests)
Transfer rate: 89.95 [Kbytes/sec] received
mongrelだとこのくらい。(ActionController::Base.allow_concurrencyをtrueに設定)
Concurrency Level: 10
Time taken for tests: 6.445000 seconds
Complete requests: 10
Failed requests: 0
Write errors: 0
Total transferred: 333750 bytes
HTML transferred: 331060 bytes
Requests per second: 1.55 [#/sec] (mean)
Time per request: 6445.000 [ms] (mean)
Time per request: 644.500 [ms] (mean, across all concurrent requests)
Transfer rate: 50.43 [Kbytes/sec] received
mod_fcgidのほうが並列処理には強いっぽい。
まあ、メモリは食いそうだけど。
追記
よくよく考えるとmongrelのプロセス一個で比べるのもあれかなぁ…
でも、mongrelのプロセス分しか並列に処理されないのも、どうにも。