| 相关配置 | hash-max-listpack-entries 等 |
|---|---|
| 旧版命名 | hash-max-ziplist-entries(7.0 前) |
| 权衡 | 紧凑省内存、超限后内存跳升 |
示例
示例
redis-cli CONFIG GET hash-max-listpack-entries
redis-cli OBJECT ENCODING myhash设计键规模贴近阈值时要预估跳变:跨过阈值单键内存可能明显上升。
hash、zset、list 等类型在小规模时用紧凑编码(Redis 7 为 listpack,此前为 ziplist),超过条目数或元素大小阈值转为标准结构。
| 相关配置 | hash-max-listpack-entries 等 |
|---|---|
| 旧版命名 | hash-max-ziplist-entries(7.0 前) |
| 权衡 | 紧凑省内存、超限后内存跳升 |
redis-cli CONFIG GET hash-max-listpack-entries
redis-cli OBJECT ENCODING myhash