I have a Redis cluster with maxmemory_human 6.05 G and used_memory_human: 4.62M
I want to fuel up this used_memory_human with dump data so i would have 2G of used_memory_human
How could i do that?
I have a Redis cluster with maxmemory_human 6.05 G and used_memory_human: 4.62M
I want to fuel up this used_memory_human with dump data so i would have 2G of used_memory_human
How could i do that?
There's a built-in debug command for that.
debug populate 2000000 testkey 1000
This will create 2 million 1kb string keys.
> 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
eval "for i=0,(1024*1024*20) do redis.call('set','testData:'..i,'1234567890') end" 0
used_memory_human:1.81G
eval "for i=0,(1024*1024*20) do redis.call('del','testData:'..i) end" 0
used_memory_human:574.41K