The following are some of the methods for memory optimization in Redis:
For hashes, lists, and sorted sets, this special encoding is based on ziplist A Ziplist is described from
ziplist.c as follows:
The ziplist is a specially encoded dually linked list that is designed to be very memory efficient. It stores both strings and integer values, where integers are encoded as actual integers instead of a series of characters. It allows push and pop operations on either side of the list in O(1) time. However, because every operation requires a reallocation of the memory used by the ziplist, the actual complexity is related to the amount of memory used by ...