Wynn Netherland changelog.com/posts

Redis-faina - query analyzer for Redis

From folks that know something about scale, the Instagram team has realeased Redis-faina, a tool that parses Redis’ MONITOR command to provide stats on Redis queries:

# reading from stdin
redis-cli -p 6490 MONITOR | head -n <NUMBER OF LINES TO ANALYZE> | ./redis-faina.py

Overall Stats
========================================
Lines Processed     117773
Commands/Sec        11483.44

Top Prefixes
========================================
friendlist          69945
followedbycounter   25419
followingcounter    10139
recentcomments      3276
queued              7

Top Keys
========================================
friendlist:zzz:1:2     534
followingcount:zzz     227
friendlist:zxz:1:2     167
friendlist:xzz:1:2     165
friendlist:yzz:1:2     160
friendlist:gzz:1:2     160
friendlist:zdz:1:2     160
friendlist:zpz:1:2     156

...

Check out the source on GitHub. If you’re new to Redis, Episode 0.4.5 with @antirez is a classic.


Discussion

Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00