For the past two days, ruby development web site performance test summary
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.
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
(Unit: reqs / sec)
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.
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.
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.
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.
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.
In the use of ruby / rails process, did find that sometimes unsatisfactory performance, such as to generate a 600 layer 3 of the item directory tree structure go take 20ms, to improve performance in the study using c / c + + Writing ruby module proce
Linux performance analysis and tuning describes EDITORIAL: computer to solve the basic problem is how the hardware capabilities without adding more cases to enable them to do more work; and we apply the principles of design flexibility is an importan
http://riashanghai.com/zh-hant/node/97 When coming from the server need to display large amounts of data, we can use the DataGrid datagrid for the UI, the data provider to a ArrayCollection: var datagrid: DataGrid = new DataGrid (); datagrid.dataprov
1 Introduction Since its inception, Linux was continuously improved and popularity, now it has become one of the mainstream of general operating system, used well or very broad, Ta with Windows, UNIX Together account for nearly all the operating syst
[Author of the article: Zhang Yan paper version: v1.2 Last modified: 2009.01.12 reprint please indicate the original link: http://blog.s135.com/nginx_cache/ ] Nginx from the 0.7.48 release, support for Squid cache similar function. This cache is used
ActiveReports For. NET 6.0 is a powerful. NET report controls can be used for both Windows Forms and Web Forms platforms, with custom, high performance, high-quality, multi-language support function, can report design, print, browse , conversion, int
Mass picture storage and load balancing for distributed research (Analysis) Abstract: The massive picture of access to the site to bring down the speed, performance pressure and I / O bottlenecks and other issues, proposed a massive picture of the di