What the ziplist does is not compression, it is packing. Rather than
storing as structures, it stores it as packed data and has linear
access, as you mentioned.
When using ziplists, you are trading receiving reduced performance
along with reduced memory requirements. Your 3000 entries will be an
issue, and by just reducing the ziplist size to 300 entries, you would
likely see a jump in performance by 10x. Of course, you would also
likely see an increase in memory for any ZSET larger than 300 entries,
perhaps on the order of 10x over what you are experiencing now. I am
sorry to say, but there isn't any "free lunch" in this situation.
Either you get reduced space with reduced performance, or more space
with better performance.
If your strings are short, it is unlikely that compression will help.
And if you are using members that could be interpreted as integers
(like '38927'), those should already packed into a compact format (if
I remember correctly).
Regards,
- Josiah
> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/redis-db/-/j9Flt0uU5DsJ.
>
> To post to this group, send email to
redi...@googlegroups.com.
> To unsubscribe from this group, send email to
>
redis-db+u...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/redis-db?hl=en.