S
Supanote
Sign in Sign up

Redis 8.0 Async io-threads & Linux Kernel Tuning (redis.conf)

plain (ini) 1 day ago · 45 lines · 4 views
Verified Blueprint Redis 8.0+

Unlock up to +112% throughput in Redis 8.0 with the redesigned async io-threads engine, lazyfree non-blocking eviction, and active defrag.

  • ✓ Configures Redis 8 redesigned asynchronous network I/O threading without command-execution mutex contention
  • ✓ Eliminates main-thread latency spikes on large DEL/FLUSH/evictions via lazyfree-lazy-* flags
  • ✓ Pairs active memory defragmentation with required Linux vm.overcommit_memory and somaxconn settings
Quick Fetch
1# Redis 8.0+ High-Throughput Production Configuration (/etc/redis/redis.conf)
2# Prerequisite Linux sysctl (/etc/sysctl.d/99-redis.conf):
3# vm.overcommit_memory = 1
4# net.core.somaxconn = 65535
5
6bind 127.0.0.1 -::1
7protected-mode yes
8port 6379
9tcp-backlog 65535
10tcp-keepalive 300
11timeout 0
13# 1. Redis 8.0 Redesigned Asynchronous Multi-Core I/O Engine
14# Offloads socket reads, RESP parsing, and reply writes across cores (set to ~60-75% of physical cores, max 8-12)
15io-threads 8
17# 2. Memory Ceiling & Non-Blocking Lazy Eviction
18maxmemory 16gb
19maxmemory-policy allkeys-lfu
20maxmemory-samples 10
22lazyfree-lazy-eviction yes
23lazyfree-lazy-expire yes
24lazyfree-lazy-server-del yes
25replica-lazy-flush yes
26lazyfree-lazy-user-del yes
27lazyfree-lazy-user-flush yes
29# 3. Online Jemalloc Active Defragmentation (Prevents RSS bloat on variable-sized payloads)
30activedefrag yes
31active-defrag-ignore-bytes 256mb
32active-defrag-threshold-lower 10
33active-defrag-threshold-upper 100
34active-defrag-cycle-min 1
35active-defrag-cycle-max 25
37# 4. Hybrid RDB + AOF Persistence & Latency Monitor
38appendonly yes
39appendfsync everysec
40aof-use-rdb-preamble yes
41no-appendfsync-on-rewrite yes
42latency-monitor-threshold 5
43slowlog-log-slower-than 2000
44slowlog-max-len 512

No replies yet

Every reply is a note. Start a discussion, ask a question, or attach a code snippet.

Related Redis 8.0+ & Database, Cache & SQL Blueprints

Production-ready configurations and diagnostics from the verified Supanote library.

All Database, Cache & SQL →
Interactive Developer Workbench: .env, Log & API Key Secret Scanner

Detect and redact leaked AWS keys, JWTs, database URIs, private keys, and Bearer tokens before sharing.

Open Secret Scanner →

Share Note

Open
Download SVG
Social Card Preview
Open on mobile
Point your phone camera to open this note directly

Report this note

Notification