-
Notifications
You must be signed in to change notification settings - Fork 739
Redis Memory Optimization
sripathikrishnan edited this page Apr 20, 2012
·
12 revisions
Redis keeps all its data in memory, and so it is important to optimize memory usage. This document explains several strategies to reduce memory overheads.
h2. Use 32 bit instances
h2. Avoid multiple databases
h2. Use Integer IDs
h2. Avoid Strings smaller than 100 bytes
h2. Use key expiry judiciously
h2. Optimize for small maps, lists and sorted sets
h2. Integer Sets - 16, 32 or 64 bits
h2. Use lists instead of dictionaries for small, consistent objects
h2. Use Bitmaps to encode data
h2. Create your own data types