# Why your Redis is slow: it is single threaded and you sent it KEYS

DevFeed: [Why your Redis is slow: it is single threaded and you sent it KEYS](<https://devfeed.tech/articles/why-your-redis-is-slow-it-is-single-threaded-and-you-sent-it-keys-39605.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/53-redis-single-threaded-keys-command/>)

Author: hello@ankit-rana.com

Published: 2026-09-15T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [Redis](<https://devfeed.tech/topics/redis.md>), [Latency](<https://devfeed.tech/topics/latency.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>)

Tags: [blocking](<https://devfeed.tech/tags/blocking.md>), [caching](<https://devfeed.tech/tags/caching.md>), [command](<https://devfeed.tech/tags/command.md>), [latency](<https://devfeed.tech/tags/latency.md>), [observability](<https://devfeed.tech/tags/observability.md>), [performance](<https://devfeed.tech/tags/performance.md>), [redis](<https://devfeed.tech/tags/redis.md>), [single-threaded](<https://devfeed.tech/tags/single-threaded.md>)

## AI overview

The article explains that Redis executes commands one at a time on a single thread, so expensive commands can block every client and cause latency spikes across all operations. It identifies KEYS as a key offender and also discusses large DEL operations, unbounded LRANGE, SMEMBERS on large sets, and FLUSHALL. Redis 6 threaded I/O helps with socket handling but does not change single-threaded command execution.

## Source excerpt

Redis executes commands one at a time on a single thread, so any command that takes 200ms makes every other client wait 200ms regardless of how trivial their request was. KEYS scans the entire keyspace and is the obvious offender, but DEL on a large collection, unbounded LRANGE, SMEMBERS on a big set and FLUSHALL are all linear in the size of the data and block identically. The tell is a latency spike across all operations at once while CPU and network look normal.