Documentation
Installation
Windows
Mac
Linux
Docker
AWS EC2
AWS CloudFormation
Activating RDBTools
Features
Add a Redis instance
Memory Analysis
Performance Metrics
Java Serialized Objects
Views
Profiler
Slowlog
CLI
Configuration
Cluster Management
Memory Optimization
Compress Values
Use Smaller Keys
Switch to 32 Bits
Upgrade Redis Version
Use Better Serializer
Combine Smaller Strings to Hashes
Switch from Set to Intset for Numeric IDs
Switch to Bloom Filter or HyperLogLog
Shard Big Hash to Small Hash
Convert Hashtable to Ziplist for Hashes
Convert to a List instead of Hash
Compress Field Names
Enable Compression for List
Avoid Dynamic Lua Script
Reclaim Expired Keys Memory Faster
Release Notes
v0.9.42
v0.9.41
v0.9.40.1
v0.9.40
v0.9.39
v0.9.38
v0.9.37
v0.9.36
v0.9.35
v0.9.34.2
v0.9.34.1
v0.9.34
v0.9.33
v0.9.32
Compress Field Names
Redis Hash consists of Fields and their values. Like values, field name also consumes meory, so it is required to keep in mind while assigning field names. If you have a large number of hashes with similar field names, the memory adds up significantly. To reduce memory usage, you can use smaller field names.
What do We Mean By Compress Field Names
Referring to the previous example in convert hashes to list, we had a hash having user details.
hmset user:123 id 123 firstname Bob lastname Lee
location CA twitter bob_lee
In this case- firstname, lastname, location, twitter are all field names which could have been shortened to:
fn, ln, loc, etc
. By doing this, you could have saved some memory that was been used by the field names.