Databases 6 min read

Redis 6 Multithreaded I/O: Design, Implementation, and Performance Evaluation

RedisConf 2019 highlighted the introduction of multithreaded I/O in Redis 6, detailing its architecture, thread handling of network reads/writes, configuration settings, and benchmark results that show roughly double the throughput for GET/SET commands compared to the single‑threaded Redis 5.0.5.

Big Data Technology & Architecture
Big Data Technology & Architecture
Big Data Technology & Architecture
Redis 6 Multithreaded I/O: Design, Implementation, and Performance Evaluation

RedisConf 2019 was held early in San Francisco (April 1‑3) to celebrate Redis's 10th anniversary, featuring over 1,600 registrants and 80 talks, including a presentation by Redis creator antirez on the new multithreaded I/O feature in Redis 6.

Historically, Redis was single‑threaded and its performance bottleneck was network I/O; two optimization directions are improving network I/O (e.g., using DPDK) and leveraging multithreading (as in Memcached). After many community requests, Redis 6 finally added multithreaded I/O.

The multithreaded I/O handles only network read/write and protocol parsing, while command execution remains single‑threaded to avoid added complexity with key, Lua, transaction, and list operation concurrency.

The I/O threads operate in a lock‑free manner: the main thread receives connections, queues read events, distributes connections to I/O threads via round‑robin, waits (spinlock) for I/O completion, then executes commands serially.

Performance testing was conducted on Alibaba Cloud Ubuntu 18.04 instances (8 CPU 2.5 GHz, 8 GB RAM). The multithreaded version was built from the unstable branch, while the single‑threaded baseline was Redis 5.0.5. Configuration added:

io-threads 4 # enable 4 I/O threads
io-threads-do-reads yes # also parse requests in I/O threads

The benchmark command used was:

redis-benchmark -h 192.168.0.49 -a foobared -t set,get -n 1000000 -r 100000000 --threads 4 -d ${datasize} -c 256

Results show that with 4 I/O threads, GET/SET throughput roughly doubled compared to the single‑threaded version. The data serve as a proof‑of‑concept rather than production‑grade metrics.

Redis 6.0 is expected to be released by the end of 2019, bringing performance, protocol, and access‑control improvements, with further work on Redis Cluster proxy for multi‑language SDK compatibility.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

redisI/OmultithreadingBenchmarkdatabases
Big Data Technology & Architecture
Written by

Big Data Technology & Architecture

Wang Zhiwu, a big data expert, dedicated to sharing big data technology.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.