Site icon Semantic Creatures

Why is Redis so fast?

Redis is an open-source in-memory database/data store, which means that its access is 1000 times faster than random disk access. Unlike traditional databases, Redis holds all the information in memory as opposed to performing continuous reads and writes. This allows for constant-time data access, which is crucial for operations requiring high speed. Redis uses Jemalloc, a general purpose memory allocation library that focuses on offering robust concurrency support as well as minimising memory fragmentation. While this seems rather a nice catchy sentence, minimising memory fragmentation offers several benefits, as follows:

The fact that Redis is so fast is, however, due to a combination of factors beyond the speed of in-memory data storage. For example:

References:

Jemalloc General Purpose Memory Allocator

Lua Scripting

Exit mobile version