Determining response times with tcprstat
Posted on August 9th, 2011
Tcprstat is a free, open-source TCP analysis tool that watches network traffic and computes the delay between requests and responses. From this it derives response-time statistics and prints them out. Tcprstat is a useful way to see the response time which is useful in Cassandra because it typically servers numerous low latency reads a second.
Getting ready
This recipe requires the tcprstat utility. More information is available at http://www.percona.com/docs/wiki/tcprstat:start#installing_tcprstat
How to do it…
Download the static binary and set the execute permissions.
#wget http://github.com/downloads/Lowercases/tcprstat/tcprstat-static.v0.3.1.x86_64
#chmod a+x tcprstat-static.v0.3.1.x86_64
Start tcprstat listening for connections on 9160 with an interval of 1 second for 5 iterations.
$ sudo ./tcprstat-static.v0.3.1.x86_64 -f '%a\t%95M\t%99M\n' -p 9160 -t 1 -n 5
avg 95_max 99_max
34970 319130 390066
80550 388822 1193412
61438 196447 1505527
118754 836736 1528195
244351 2162598 2283161
How it works…
tcprstats requires root access to be able to tap the network device. After initialization it monitors connections and records the timing of requests and responses. It then displays this information in real time. tcprstat can also be used on pcap files captured with tcpdump.
Tags: cassandra, nosql, tcprstat
Filed under Chapter 13 Monitoring |
Leave a Reply
You must be logged in to post a comment.