For the past two days, ruby development web site performance test summary

分类:Ruby 2009-03-08 来源:CodeWeblog.com 人气:652

This is only the individual test, is also a ruby beginner test, if ill-Optimize and causing significant error also invited Members to make the exhibitions.

  1. Rails vs Rack vs Merb:
    Merb worse performance than Rails, but documents, rich plug-ins, plus Rack can deal with some of the demand for high-speed. Also heard to Merb into Rails, high-speed processing and Metal, really unlimited prospects.
    Rack one word fast, cool.
    Merb looks beautiful, but found that too little documentation. All beginners do not test, such as I want to let ActiveRecord support for Enum types, Merb seems to need its own sword, and Rails can be used with a speed of static> Rack> Merb> Rails
    The speed of horizontal comparison
    Static Rack Merb Rails
    Speed 3130 1192 305 180

    (Unit: reqs / sec)

  2. Cache:
    page cache is very convenient, but also directly generate html, can easily realize the whole point of static, and only if the id of each file are kept in the same directory, it is hard to imagine tens of thousands of documents squeezed in a directory. cache has yet to be studying. Fragment seems to be able to solve this problem.
    For very simple helloworld, action cache unpleasant anti-slow. reqs from 180 down to 150.
  3. Server:
    Fastcgi faster than a lot of Mongrel. Mongrel easier to use. I now use development are mongrel, production using fastcgi
    Nginx and lighttpd almost fast,
    apache2 performance mod_rails remember the good, the specific numerical forget, apache2 is too large, memory accounted for much more flexibility to configure Nginx not good, and in terms of performance and Nginx and Lighttpd have not a small gap, so no longer be considered.
  4. Personally, I finally Orientation:
    Nginx + Fastcgi + Rails + Rack as my Rails platform.

In addition to my blog are http://www.jiangmiao.org/blog Medium ruby in the recent study, ruby now give me the greatest feeling is flexible and convenient.

2009-1-21 added:

  1. Fastcgi
    After practice, found at fastcgi on lighttpd is better, the best performance and stability for Rails platform or recognized Lighttpd + Fastcgi. However, it is undeniable nginx for a very good server, especially in the configuration of him, I was particularly China and Italy.
  2. Cache
    Fragment Cache referred to as the Page Cache with two different levels of cache,
    Page to provide the full text of cache, the controller in caches_page: actionName form.
    Fragment for regional cache, in the views in a <% cache do%> xxx <% end%> form.
    Fragment Cache memory about the way such as documents mentioned in
    #Memory cache, and is the default cache
    ActionController::Base.cache_store = :memory_store
    #To save a file
    ActionController::Base.cache_store = :file_store, "/path/to/cache/directory"
    ActionController::Base.cache_store = :drb_store, "druby://localhost:9192"
    ActionController::Base.cache_store = :mem_cache_store, "localhost"
    ActionController::Base.cache_store = MyOwnStore.new("parameter") #Rewrite its own Store
    

    Environment can be added in the statement set config.cache_store = xxx

    Online article a lot of use out-of-date version of the rails still exist fragment_cache_store = as a tutorial, a lot of people take a detour. Rails upgrade or so at the process of studying, reading changelog is necessary.

    About Custom Store online tutorial appears to have done little, but its not complicated, because of rails open source, everyone can refer to MemoryStore source memorystore_cache.rb
    Such as class MyOwnStore <ActiveSupport:: Cache:: Store and rewrite write, read, etc., you can easily develop Fragment caching methods.

    About more cache can refer to http://www.railsenvy.com/2007/2/28/rails-caching-tutorial But attention to the version of rails is also obsolete, because of its log or show Completed in 0.18700 (5 reqs / sec) | Rendering: 0.10900 (58%) | DB: 0.00000 (0%) forms.

分享到:
blog comments powered by Disqus

相关文章

  • Web site performance analysis plug-ins - YSlow 2010-03-16

    Yahoo released a FireFox plug-in based, called YSlow , the plug-in can analyze a site's page, and tell you to improve website performance and how to optimize based on some rules. Install YSlow, you need to install the FireFox Another popular WEB ...

  • Several high-performance plug-ins Recommended Ruby On Rails developers 2010-02-02

    Ruby On Rails is a very powerful development framework for WEB. But also the existence of many plug-ins can increase the expansion of its capabilities. More suitable for our use. Recommend several here on the development of plug-in Ruby On Rails. Ruby On

  • Eclipse plug-ins to use Ruby Development Tools 2009-09-09

    Eclipse plug-ins to use Ruby Development Tools Document options Send as an e-mail this page Tomcat Application Development Download IBM open-source J2EE application server, WAS CE new version V1.1 Level: Intermediate Neal Ford ( neal.ford @ gmail.com ), A

  • Use TPTP Eclipse plug-ins on the performance analysis and tuning 2010-08-25

    Introduction: TPTP (Eclipse Test & Performance Tools Platform Project) is a sub-project under the Eclipse Foundation, Eclipse-based software used to provide auxiliary tool, from testing to operation monitoring, almost covering all phases of software d

  • Eclipse plug-ins download Address 2009-05-07

    1 EMF, GEF - Graphical Editor Framework, UML2, VE - Visual Editor download here http://www.eclipse.org/downloads/index.php 2 lomboz J2EE plug-ins, development JSP, EJB http://forge.objectweb.org/projects/lomboz 3 MyEclipse J2EE development of plug-in, sup

  • Eclipse plug-ins download the relevant address 2009-05-15

    Eclipse Download EMF, GEF - Graphical Editor Framework, UML2, VE - Visual Editor download here http://www.eclipse.org/downloads/index.php 2 lomboz J2EE plug-ins, development JSP, EJB http://forge.objectweb.org/projects/lomboz 3 MyEclipse J2EE development

  • Download eclipse plug-ins 2009-07-11

    velocity plug: You can download, http://sourceforge.net/projects/veloedit/ There are a: http://www.cnblogs.com/hw/articles/251148.html A powerful package jar download address, click on the registration can be downloaded quickly, address the www.jarbao.com

  • MyEclipse shortcut keys and plug-ins Guinness 2009-08-12

    Related Articles: Eclipse summary of commonly used classification of shortcut keys Let us work together more efficient use of Eclipse Is that we usually use eclipse shortcut bar Recommended circle: IntelliJ IDEA More Recommended <script type="text

  • Eclipse plug-ins list of commonly used 2010-04-29

    Properties Editor Properties Editor Edit java properties file and can automatically Save as Unicode format Colorer Take Colorer Take for hundreds of types of files by syntax coloring XMLBuddy XMLBuddy edit xml file Code Folding Code Folding adding a numbe

iOS 开发

Android 开发

Python 开发

JAVA 开发

开发语言

PHP 开发

Ruby 开发

搜索

前端开发

数据库

开发工具

开放平台

Javascript 开发

.NET 开发

云计算

服务器

Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.222 (s). 15 q(s)