Jump to content

User:ATDT

From mediawiki.org
(Redirected from User:Ori Livneh (WMF))

Get one minute of Redis activity

[edit]
#!/usr/bin/env
PASS=$(mwscript eval.php enwiki <<<'echo "$wmgRedisPassword";' | head -1)
bash redis-cli -a $PASS monitor &
sleep 60
kill $!

Redis

[edit]
Useful miscellany from the redis-db list

Memory usage of redis suspiciously exceeds size of dump

[edit]
  • What types of keys do you have? How big are they? What are they storing?
  • In INFO output: memory fragmentation ratio, used_memory_rss
  • Debug memory use with DEBUG OBJECT <key>

Sets

[edit]
  • It's not documented, but you can use ZINTERSTORE and ZUNIONSTORE with SETs in Redis, they act as though their members all have a score of 1.
  • BLPOP will block the connection until a new item is available to pop from a list