File: TUNING [Unicorn: Rack HTTP server for fast clients and Unix]:
Unicorn performance is generally as good as a (mostly) Ruby web server can provide. Most often the performance bottleneck is in the web application running on Unicorn rather than Unicorn itself. Unicorn Configuration See Unicorn::Configurator for details on the config file format. worker_processes is the most-commonly needed tuning parameter. Unicorn::Configurator#worker_processes worker_processes should be scaled to the number of processes your backend system(s) can support. DO NOT scale it to the number of external network clients your application expects to be serving. Unicorn is NOT for serving slow clients, that is the job of nginx. worker_processes should be at least the number of CPU cores on a dedicated server. If your application has occasionally slow responses that are /not/ CPU-intensive, you may increase this to workaround those inefficiencies. worker_processes...