如何在ec2上运行ruby / unicorn / nginx / app的AB Benchmarks?

我正准备与一个应用程序,并想知道是否有人可以给我一些见解我的基准。 他们如何比较,我可以做什么系统级的调整,以提高他们等等。

我的设置如下:

  • m1.large amazon ec2实例,运行Ubuntu 11.04 Natty。
  • Nginx作为Web请求的反向代理。 这些请求被unix socket套接到一群提供ruby(1.9.2)应用程序的独angular兽工作者(Sinatra作为框架)

当运行apache替代时,如下ab -n 10000 -c 10 http://localhost/我得到的内存消耗可以忽略不计,还有更高的CPU峰值。 我看到大约75-80%的CPU使用率

最佳结果:

 Cpu(s): 43.1%us, 20.9%sy, 0.0%ni, 21.5%id, 1.0%wa, 0.0%hi, 2.4%si, 11.1%st 

我的基准testing结果如下:

 Server Software: nginx/0.8.54 Server Hostname: loalhost Server Port: 80 Document Path: / Document Length: 3683 bytes Concurrency Level: 10 Time taken for tests: 13.072 seconds Complete requests: 10000 Failed requests: 0 Write errors: 0 Total transferred: 38570000 bytes HTML transferred: 36830000 bytes Requests per second: 765.00 [#/sec] (mean) Time per request: 13.072 [ms] (mean) Time per request: 1.307 [ms] (mean, across all concurrent requests) Transfer rate: 2881.46 [Kbytes/sec] received