0
$\begingroup$

We are collecting certain metrics using (Graphite + Grafana) use them as a tool to monitor system health and performance.

For one of the latency metric, we get the total time as well as the latencies for all the sub-components it is composed of.

We display 99th percentile for all the values. However, if we sum up the 99th percentiles for latencies of sub-components, they do not equate to the 99th percentile of the total time.

Essentially it comes down if the percentiles can follow summation rules. i.e.

if 
a + b + c + d = s

then,
p99(a) + p99(b) + p99(c) + p99(d) = p99(s) ?

Will this hold?

$\endgroup$

1 Answer 1

2
$\begingroup$

In general it does not happen. I will show an example for the median

median(1:5) [1] 3 median(c(17,2,1,1,1)) [1] 1 median(c(18,4,4,5,6)) [1] 5

And obviously 5 does not equal 1 + 3.

The same can happen for any quantile of course but generating an example for the 99th centile would take up more space.

$\endgroup$
3
  • $\begingroup$ To add to this, in my case, they were not at the exact same time. So yeah it makes sense now. $\endgroup$ Commented Dec 21, 2016 at 15:29
  • 1
    $\begingroup$ @mdewey I agree with your conclusion but don't understand your example. If by median(1:5) you mean that the data is 1 2 3 4 5 then I agree the sample median is 3. But what does c(17,2,1,1,1) mean? $\endgroup$ Commented Dec 21, 2016 at 20:04
  • $\begingroup$ @MichaelChernick it is a vector containing those five elements in that order $\endgroup$
    – mdewey
    Commented Dec 21, 2016 at 21:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.