Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Gist from "Under the Hood of Redis: Hash [Part 2] & List"
config set hash-max-ziplist-entries 1
+OK
config set hash-max-ziplist-value 1000000
+OK
flushall
+OK
info memory
$225
# Memory
used_memory:508536
multi
+OK
time
+QUEUED
eval "for i=0,10000,1 do redis.call('hset', 'test', i, i) end" 0
+QUEUED
time
+QUEUED
exec
*3
*2
$10
1449161639
$6
948389
$-1
*2
$10
1449161639
$6
967383
debug object test
+Value at:0x7fd9864d6470 refcount:1 encoding:hashtable serializedlength:59752 lru:6321063 lru_seconds_idle:23
info memory
$226
# Memory
used_memory:1025432
multi
+OK
time
+QUEUED
eval "for i=0,10000,1 do redis.call('hget', 'test', i) end" 0
+QUEUED
time
+QUEUED
exec
*3
*2
$10
1449161872
$6
834303
$-1
*2
$10
1449161872
$6
841819
flushall
+OK
info memory
$226
# Memory
used_memory:510152
config set hash-max-ziplist-entries 100000
+OK
multi
+OK
time
+QUEUED
eval "for i=0,10000,1 do redis.call('hset', 'test', i, i) end" 0
+QUEUED
time
+QUEUED
exec
*3
*2
$10
1449162574
$6
501852
$-1
*2
$10
1449162575
$6
212671
debug object test
+Value at:0x7fd9864d6510 refcount:1 encoding:ziplist serializedlength:59730 lru:6322040 lru_seconds_idle:19
info memory
$226
# Memory
used_memory:592440
multi
+OK
time
+QUEUED
eval "for i=0,10000,1 do redis.call('hget', 'test', i) end" 0
+QUEUED
time
+QUEUED
exec
*3
*2
$10
1449162616
$6
269561
$-1
*2
$10
1449162616
$6
975149
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment