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

sponsored links
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 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 ="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 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.
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

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

  • RSpec troubleshooting

    1.uninitialized constant Dependencies Conditions: In windows under way to install the RSpec gem and rspec-rails. However, in ruby script / spec_server to do the test under the spec your_spec.rb-X will appear uninitialized constant Dependencies (NameE ...

  • Alternative to Java with Ruby to do unit testing interface rest!

    Ruby is long overdue to replace java more flexible and make some necessary changes in a matter of, if not deep-rooted culture of the company's java, I think. . . . . . The following are my Writing for the Rest of the interface used to make the test su

  • hibernate load delay

    Lazy loading: Lazy loading mechanism is in order to avoid unnecessary performance overhead and put forward the so-called lazy loading is required when the real data at a time when the real implementation of the data load operation. At Hibernate provides f

  • Workspace run under different Eclipse

    Now do live more and more often required to use eclipse in java and ruby & rails project conducted between the tangential shear from the past, because in the rails project used a coloring Aptana preferences, the results open the java project sour ...

  • Software development sunflower Baodian [reprint]

    Master the ability to reuse code very familiar with the new API's fast. This is because, he once used a lot of the API, have a lot of reusable code. He knows what is available and what is deficient. He has been using Qt, also used by gtk +, also used

  • jBPM Development Getting Started Guide

    Although the workflow is still immature stage of development, not even a recognized standard. But its application has already been launched in the Express, indicating the market's demand for job-flow framework are urgent and enormous. Backgrounds of o

  • Openfire Plugin Developer's Guide

    Introduction Openfire features plug-ins are enhanced. This document is a guide to developers to create plug-ins. The structure of a plug-in Plug-ins Plug-ins openfireHome stored in the directory. When deploying a plug-in jar or war file, it will automatic

  • RoR explained

    ROR is Ruby on Rails. Ruby is a well-known has been very good dynamic language It's dynamic language. Simple and easy. Dynamic languages are interpreted, but the performance may make a discount, but not absolute, because the application is complex, th

  • Oracle instant clent for ruby / rails on cygwin

    Environment: XP: oracle full client, ruby, rails, gem cygwin: ruby rails, gem (the version with the XP version) Needs: for cygwin is installed under the rails platform support oci Steps: <1> download oracle instant client ( Instant Client Pa

  • Build flex + spring + blazeds + hibernate application

    Build flex + spring + blazeds + hibernate application First, set up the project blazeds 1, will blazeds.war extract to a directory, such as: myflex /; 2, set up java works were such as: MyFlex, in the orientation of selection create project from exis ...

blog comments powered by Disqus
Recent Entries
Tag Cloud
Random Entries