0

We are using Redis as a Queue which has on an average about ~3k rps. But when we check the instantaneous_ops_per_sec, this value consistently reports higher than expected, by about 20%, in this case, reports ~4k ops per sec.

To verify this, I have taken a dump of MONITOR for about 10 seconds and checked the number of incoming commands.

grep "1489722862." monitor_output | wc -l

Where 1489722862 is the timestamp. Even this count matches with what is being produced in the queue and what is being consumed from the queue. This is a master-slave redis cluster setup. Does instantaneous_ops_per_sec also account for the slave reads? If not, what is the other reason for which this count is significantly higher?

sreeraag
  • 513
  • 1
  • 5
  • 19

1 Answers1

0

The instantaneous_ops_per_sec metric is calculated as the mean of the recent samples that the server took. The number of recent samples is hardcoded as 16 by STATS_METRIC_SAMPLES in server.h.

Itamar Haber
  • 47,336
  • 7
  • 91
  • 117
  • Sorry, I'm still not very clear on this. If i always take the most recent 16 samples, how can the count be always higher than the "wc -l" of MONITOR command? – sreeraag Mar 20 '17 at 06:37