redis - 如何增加 Redis 中的used_memory?

标签 redis

我有一个 Redis 集群,最大内存_人类 6.05 G,已使用_内存_人类:4.62M

我想用转储数据为这个used_memory_human加油,这样我就有2G的used_memory_ human

我怎样才能做到这一点?

最佳答案

有一个内置的调试命令。

调试填充 2000000 testkey 1000

这将创建 200 万个 1kb 字符串 key 。

> debug populate 2000000 testkey 1000
OK
(2.52s)
> scan 0
1) "65536"
2)  1) "testkey:1637732"
    2) "testkey:510112"
    3) "testkey:1313139"
    4) "testkey:34729"
    5) "testkey:734989"
    6) "testkey:996052"
    7) "testkey:223126"
    8) "testkey:1578003"
    9) "testkey:1335698"
   10) "testkey:1151100"
> info memory
# Memory
used_memory:2185489192
used_memory_human:2.04G
used_memory_rss:2247540736
used_memory_rss_human:2.09G
used_memory_peak:2185571088
used_memory_peak_human:2.04G

关于redis - 如何增加 Redis 中的used_memory?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50755431/

相关文章:

python - 使用 Python/Flask 管理长时间运行的 API 监听器

mysql - 对于审计日志记录,哪种技术最好?

spring-boot - 在 Aerospike 中更新单个字段的最佳方法

php - 如何在 redis 中使用 GEOADD 存储额外数据

php - 尽管使用 --tries,Laravel 队列不会自动失败

.net - 使用 string[] 进行 Hash.Remove 时出现异常

node.js - Socket.io 分布在不同的服务器上

node.js - 带有 Websocket 的 Nodejs REST API

azure - 如何在 azure kubernetes 上的 vnet 中配置 Azure redis 缓存?

java - Java Spring Boot 会以线程安全的方式在 Redis 中设置和获取值吗?