metal and activerecord
Benchmarking localhost (be patient).....done
Server Software: Mongrel
Server Hostname: localhost
Concurrency Level: 1
Complete requests: 25
Failed requests: 0
Write errors: 0
Requests per second: 0.83 [#/sec] (mean)
Percentage of the requests served within a certain time (ms)
50% 5
66% 6
75% 45
80% 5007
90% 5008
95% 5009
98% 5010
99% 5010
100% 5010 (longest request)
At first I thought something was wrong with my code (as it usually happens) but numbers show that metal became equally slow after first several super fast calls. Commenting parts of my code made clear that it has something with AR because code without find() worked fine.
The answer told by Google was to call
ActiveRecord::Base.clear_active_connections!
before returning resulting array from call.
Metal wins with ~240 req/s when ActionController was almost twice slower.
Labels: activerecord, metal