首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网络技术 > 网络基础 >

VPS上的Rails应用服务器选择

2012-12-26 
VPS下的Rails应用服务器选择在我多次重装系统,重装环境后,终于发现,之前写的文章http://mangege.iteye.com

VPS下的Rails应用服务器选择
  在我多次重装系统,重装环境后,终于发现,之前写的文章http://mangege.iteye.com/blog/992571提到的你推测问题是由于应用服务器引起的.在VPS下,thin的反应速度太慢了,打开一个页面要2~3秒甚至更久,Passenger的速度很快,一点就开.看样子Passenger有针对VPS优化过

  我只是测试的比较一下thin和Passenger,其它的应用服务器就不比较了,Passenger已经满足了我的需求.

  VPS 环境:UBUNTU 10.04,Ruby 1.9.2(不一定要REE)

  Passenger VPS下测试结果
引用Server Software:        nginx/0.8.54

Document Path:          /posts
Document Length:        3450 bytes

Concurrency Level:      10
Time taken for tests:   280.203125 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      4069000 bytes
HTML transferred:       3450000 bytes
Requests per second:    3.57 [#/sec] (mean)
Time per request:       2802.031 [ms] (mean)
Time per request:       280.203 [ms] (mean, across all concurrent requests)
Transfer rate:          14.18 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:      187  279 301.5    265    3296
Processing:   344 2508 960.4   2234    9985
Waiting:      265 1652 1041.9   1515    8187
Total:        640 2787 1016.4   2500   10281

Percentage of the requests served within a certain time (ms)
  50%   2500
  66%   2515
  75%   2578
  80%   2593
  90%   5171
  95%   5500
  98%   5609
  99%   5625
100%  10281 (longest request)


Thin VPS下测试结果
引用Server Software:        thin

Document Path:          /posts
Document Length:        3450 bytes

Concurrency Level:      10
Time taken for tests:   333.421875 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      3972000 bytes
HTML transferred:       3450000 bytes
Requests per second:    3.00 [#/sec] (mean)
Time per request:       3334.219 [ms] (mean)
Time per request:       333.422 [ms] (mean, across all concurrent requests)
Transfer rate:          11.63 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:      187  332 493.1    281    3390
Processing:   297 2978 2060.7   2234   28140
Waiting:      281 1890 1407.3   1500   10843
Total:        500 3310 2125.8   2500   28343

Percentage of the requests served within a certain time (ms)
  50%   2500
  66%   2578
  75%   4921
  80%   5218
  90%   5500
  95%   5562
  98%   8421
  99%   8671
100%  28343 (longest request)

  受网络影响,速度有可能不准确.从数据可以看出,性能大致差不多.但如果直接用浏览器打开,个人能够明显感觉出Passenger要快.所以在VPS不要为了省事,而选择安装thin

热点排行