123456789_123456789_123456789_123456789_123456789_

Tuning unicorn

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

Unicorn::Configurator#listen Options

Other unicorn settings

Kernel Parameters (Linux sysctl and sysfs)

WARNING: Do not change system parameters unless you know what you’re doing!

echo madvise >/sys/kernel/mm/transparent_hugepage/enabled

Or disabling it system-wide, via "never".

n.b. "page" in this context only applies to the OS kernel,
Ruby GC implementations also use this term for the same concept
in a way that is agnostic to the OS.