在我多次重装系统,重装环境后,终于发现,之前写的文章
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
分享到:
相关推荐
本教程适合新手初次部署 Rails 应用; 本文测试通过环境 Ubuntu 12.04 Server, 服务器安装测试于 Linode VPS (Ubuntu 12.04 LTS (GNU/Linux 3.4.2-x86_64-linode25 x86_64)。 配置 Ubuntu Server 系统 如果你是...
将应用程序放在服务器上。 捆绑宝石。 应用迁移。 重新启动服务。 Easy Rails部署 git push master heroku:master , , , ,其他… 快速简便,但不灵活且昂贵。 您自己的基础架构 更复杂[^ 1],但更灵活且更...
- **Ruby**: Ruby是一种简洁而强大的编程语言,GoDaddy支持Ruby on Rails应用框架,特别是其支持的CGI技术。 - ***: ***是微软开发的用于构建动态网页的技术,GoDaddy提供Windows VPS和虚拟主机支持***。 ### 资源...
GitLab系统主要由GitLab Rails应用程序、NginxWeb服务器和数据库组成。其中,Nginx是GitLab系统的Web服务器,负责处理HTTP请求和提供静态资源。 二、安装Nginx 为升级GitLab系统中的Nginx版本,需要首先安装系统...
3. **Ruby on Rails**: 虽然Rails主要用于构建动态Web应用,但也可以用于构建博客系统。Rails提供了丰富的库和框架,如ActiveRecord用于数据库操作,ActionController处理HTTP请求,以及ActionView用于渲染视图。...