Join us for RedisConf and Hackathon, April 20-21
The first method of reducing memory use in Redis is simple: use short structures. For
LISTs, SETs, HASHes, and ZSETs, Redis offers a group of configuration options that
allows for Redis to store short structures in a more space-efficient manner. In this section,
we’ll discuss those configuration options, show how to verify that we’re getting
those optimizations, and discuss some drawbacks to using short structures.
When using short LISTs, HASHes, and ZSETs, Redis can optionally store them using
a more compact storage method known as a ziplist. A ziplist is an unstructured representation
of one of the three types of objects. Rather than storing the doubly linked
list, the hash table, or the hash table plus the skiplist as would normally be the case for
each of these structures, Redis stores a serialized version of the data, which must be
decoded for every read, partially re-encoded for every write, and may require moving
data around in memory.
TRY REDIS ENTERPRISE CLOUD FREE
Redis Enterprise Cloud provides complete automation of day-to-day database operations. Start now with 30MB of free storage.
© 2021 Redis Labs. Redis and the cube logo are registered trademarks of Redis Labs Ltd.