Redis › Redis Performance Tuning & Benchmarking

What operating system level tuning settings can affect Redis performance, and how would you optimize them for a production deployment?

Advanced

Answer

You might disable transparent huge pages since they can interfere with Redis's memory management, adjust the overcommit_memory kernel setting to avoid issues during background save operations, increase the maximum number of open file descriptors to support many simultaneous client connections, and ensure the server has sufficient network bandwidth and low latency connectivity for your expected traffic.
echo never > /sys/kernel/mm/transparent_hugepage/enabled
sysctl vm.overcommit_memory=1
Real-world example A team deploying Redis for a high traffic production workload carefully tunes several operating system level settings, including disabling transparent huge pages, after researching Microsoft's and Redis's own recommended production configuration guidelines.

Common follow-ups: Why do transparent huge pages specifically cause problems for Redis?;What file descriptor limit is generally recommended for a busy Redis instance?