Skip to content

Redis Optimization Cheatsheet

TCP Backlog

sysctl -w net.core.somaxconn=1024

cat /proc/sys/net/core/somaxconn
echo 511 > /proc/sys/net/core/somaxconn

vm.overcommit_memory

sysctl vm.overcommit_memory=1

Transparent Huge Pages (THP)

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

AOF and RDB

auto-aof-rewrite-percentage
auto-aof-rewrite-min-size

IO optimization for SSDs

echo noop | sudo tee /sys/block/sda/queue/scheduler

Reference