redis-faina

A query analyzer that parses Redis' MONITOR command for counter/timing stats about query patterns
Download

redis-faina Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Rick Branson
  • Publisher web site:
  • http://github.com/rbranson/

redis-faina Tags


redis-faina Description

redis-faina is a query analyzer that parses Redis' MONITOR command for counter/timing stats about query patterns.At its core, redis-faina uses the Redis MONITOR command, which echoes every single command (with arguments) sent to a Redis instance. It parses these entries, and aggregates stats on the most commonly-hit keys, the queries that took up the most amount of time, and the most common key prefixes as well.Usage is simple:# reading from stdinredis-cli -p 6490 MONITOR | head -n | ./redis-faina.py# reading a fileredis-cli -p 6490 MONITOR | head -n > /tmp/outfile.txt./redis-faina.py /tmp/outfile.txtThe output (anonymized below with 'zzz's) looks as follows:Overall Stats========================================Lines Processed 117773Commands/Sec 11483.44Top Prefixes========================================friendlist 69945followedbycounter 25419followingcounter 10139recentcomments 3276queued 7Top Keys========================================friendlist:zzz:1:2 534followingcount:zzz 227friendlist:zxz:1:2 167friendlist:xzz:1:2 165friendlist:yzz:1:2 160friendlist:gzz:1:2 160friendlist:zdz:1:2 160friendlist:zpz:1:2 156Top Commands========================================SISMEMBER 59545HGET 27681HINCRBY 9413SMEMBERS 9254MULTI 3520EXEC 3520LPUSH 1620EXPIRE 1598Command Time (microsecs)========================================Median 78.2575% 105.090% 187.2599% 411.0Heaviest Commands (microsecs)========================================SISMEMBER 5331651.0HGET 2618868.0HINCRBY 961192.5SMEMBERS 856817.5MULTI 311339.5SADD 54900.75SREM 40771.25EXEC 28678.5Slowest Calls========================================3490.75 "SMEMBERS" "friendlist:zzz:1:2"2362.0 "SMEMBERS" "friendlist:xzz:1:3"2061.0 "SMEMBERS" "friendlist:zpz:1:2"1961.0 "SMEMBERS" "friendlist:yzz:1:2"1947.5 "SMEMBERS" "friendlist:zpz:1:2"1459.0 "SISMEMBER" "friendlist:hzz:1:2" "zzz"1416.25 "SMEMBERS" "friendlist:zhz:1:2"1389.75 "SISMEMBER" "friendlist:zzx:1:2" "zzz"One caveat on timing: MONITOR only shows the time a command completed, not when it started. On a very busy Redis server (like most of ours), this is fine because there's always a request waiting to execute, but if you're at a lesser rate of requests, the time taken will not be accurate.Have more stats / improvements you'd like to see to Redis-Faina? Please fork and send pull requests! And if analyzing hundreds of thousands of requests per second across many systems is interesting to you, drop us a note and tell us a bit about yourself--we're building out our dev & devops team.Product's homepage


redis-faina Related Software