4

Does anyone know how to exactly calculate the 99.9th percentile in Splunk?

I have tried a variety of methods as below, such as exactperc (but this only takes integer percentiles) and perc (but this approximates the result heavily).

base | stats exactperc99(latency) as "99th Percentile", p99.9(latency) as "99.9th Percentile"

Thanks, James

user1763328
  • 301
  • 2
  • 3
  • 11

1 Answers1

6

From the Splunk documentation:

There are three different percentile functions:

perc<X>(Y) (or the abbreviation p<X>(Y)) upperperc<X>(Y) exactperc<X>(Y) Returns the X-th percentile value of the numeric field Y. Valid values of X are floating point numbers from 1 to 99, such as 99.95.

Use the perc<X>(Y) function to calculate an approximate threshold, such that of the values in field Y, X percent fall below the threshold.

The perc and upperperc functions give approximate values for the integer percentile requested. The approximation algorithm that is used, which is based on dynamic compression of a radix tree, provides a strict bound of the actual value for any percentile. The perc function returns a single number that represents the lower end of that range. The upperperc function gives the approximate upper bound. The exactperc function provides the exact value, but will be very expensive for high cardinality fields. The exactperc function could consume a large amount of memory in the search head.

Processes field values as strings.

Examples:

 p99.999(response_ms)
 p99(bytes_received)
 p50(salary) # median
Mike Graf
  • 5,077
  • 4
  • 45
  • 58
Igor
  • 33,276
  • 14
  • 79
  • 112