What is the best way to establish optimal pool size? The article seems to gloss over this and instead mentions 'you need to set pool: 25', but I doubt this is a one size fits all solution.
Anyone have any experience profiling these sorts of things that can share some info?
You probably want to find out max_connections for your server.
Then figure out how many other connections you'll need outside your server (rails console, cron jobs, commandline) subtract that and you have your number.
I like to have about 10 spare connections.
Running
select name, setting from pg_settings where name = 'max_connections';
Cool write up - I never heard about Puma server. I should check it.
BTW, similar result like this can be also achieved with any RoR and jruby 1.7 (for me jruby 1.7 uses much less mem then 1.6). Threads in jruby are quite cheap. And as always database is the bottleneck but jruby is cool because you can embed BerkeleyDB in it (so open temp Berkely DB and cache things like crazy).
Last time I benchmarked Puma on MRI 1.9 and 2.0 it was quite fast for most requests, but some requests took more than 20 seconds to complete. The bottom line being that it would be nice to see full ab output.
I find a single dyno on Heroku does a good job too and costs $0 / month. So far the most traffic I've handled is 1,708 page views in an hour with Rails 4 (and a lot of action caching).
Also there's no mention of what your test actually is?