4

I am trying to calculate the Read/second and Write/Second in my Cassandra 2.1 cluster. After searching and reading, I came to know about JMX bean

org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=Latency

Here I can see oneMinuteRate. I have started a brand new cluster and started collected these metrics from 0. When I started my first record, I can see

Count = 1
OneMinuteRate = 0.01599111...

Does it mean that my write/s is 0.0159911? Or does it mean that based on 1 minute data, my write latency is 0.01599 where Write Latency refers to the response time for writing a record?

Please help me understand the value.

Thanks.

AIR
  • 817
  • 12
  • 24

2 Answers2

4

It means that in the last minute, your writes per second were occuring at a rate of .01599 writes per second. Think about it this way: the rate of writes in the last 60 seconds would be

WritesInLastMinute ÷ 60

So in your case

1 ÷ 60 = 0.0166

Or more precisely, .01599.

If you observed no further writes after that, the value would descend down to zero over the next minute.

Nicholas
  • 15,916
  • 4
  • 42
  • 66
2

OneMinuteRate, FiveMinuteRate, and FifteenMinuteRate are exponential moving averages, meaning they are not simply dividing readings against time, instead, as the name implies they take an exponential series of averages as below:

result(t) = (1 - w) * result(t - 1) + (w) * event_this_period

where w is the weighting factor, t is the ticking time, in other words, simply they take 20% or the new reading and 80% of old readings, it's the same way UNIX systems measure CPU loads.

however, if this applies to requests that the server receives, below is a chart from one request to a server, measures taken by dropwizard.

enter image description here

as you can see, from one request a curve is drawn by time, it's really useful to determine trends, but not sure if they are great to monitor live traffic and especially critical one.

Abdullah Shahin
  • 1,002
  • 15
  • 19