merb with evented_mongrel
ãã®ã¾ã merb ã®ãã¼ã¸ã§ã³ãä¸ããã®ã§ã½ã¼ã¹ãè¦ã¦ã¿ãã merb.rbã«
if ENV['SWIFT'] require 'swiftcore/swiftiplied_mongrel' ... elsif ENV['EVENT'] require 'swiftcore/evented_mongrel' ... elsif ENV['PACKET'] require 'packet_mongrel' ... else require 'mongrel' end
ã®ãããªã½ã¼ã¹ã³ã¼ããï¼
evented_mongrelã使ãä¸æºå
gem install swiftiply
Merb.rootã§
EVENT=1;export EVENT; merb
ã¨ããã¨ãUsing Evented Mongrel...ã®æåãï¼
以ä¸ãå¦çã®ç¡ãã³ã³ããã¼ã©ã®ab ãã³ããã¼ã¯çµæ
é常ã®mongrel
Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 138000 bytes HTML transferred: 4000 bytes Requests per second: 521.03 [#/sec] (mean) Time per request: 57.579 [ms] (mean) Time per request: 1.919 [ms] (mean, across all concurrent requests) Transfer rate: 69.82 [Kbytes/sec] received
evented_mongrel
Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 138000 bytes HTML transferred: 4000 bytes Requests per second: 954.74 [#/sec] (mean) Time per request: 31.422 [ms] (mean) Time per request: 1.047 [ms] (mean, across all concurrent requests) Transfer rate: 127.94 [Kbytes/sec] received
ãã¯ãã»ã¼åã«ï¼ï¼
ãã ã SQLã®å¦çã¨ãããããå
¥ã£ã¦ãããã¤ã§è©¦ããã¨ããã360req/sec â 400req/sec ãããã ã£ãã
merb㯠Rack対å¿ãã¦ããã®ã§ãthinãªã©ã«ãã¹ã ã¼ãºã«å¯¾å¿ã§ãããããã thinã«ã¯ ruby-1.8.6ãå¿ è¦ã