在上个帖子 https://ruby-china.org/topics/28407 有同学问关于两个服务器的性能对此,所以就简单的做了一下测试
ab -n 100 -c 10
Requests per second: 5.56 [#/sec] (mean)
Requests per second: 5.95 [#/sec] (mean)
Requests per second: 6.06 [#/sec] (mean)
Requests per second: 6.05 [#/sec] (mean)
内存占用
deploy 3017 0.1 16.7 1207148 169636 ? Sl Dec15 1:12 unicorn worker[0]
ab -n 100 -c 10
Requests per second: 6.73 [#/sec] (mean)
Requests per second: 6.57 [#/sec] (mean)
Requests per second: 6.43 [#/sec] (mean)
Requests per second: 6.68 [#/sec] (mean)
内存占用
deploy 15916 0.6 16.1 1230948 163428 ? Sl Dec16 6:37 Passenger RubyApp
passenger app preloader
进程退出后,passenger woker 的 cpu 使用率一直在 10% 左右,等一直降至 0% 才算预热完毕,需要的时间比较久 (和程序有关)