
Response Time Percentile for Performance Measurement
Response Time
Response time in web performance measurement refers to the amount of time it takes for a client-side application to initiate and receive a request. It is a crucial metric in evaluating the efficiency of server application.
Describing Performance with Response Time
We cannot depend on a single measure of response time to assess server performance, because in practice, the response time involves variations on each attempt, due to network congestion, garbage collection pause, content switch, etc.
Therefore, we have to think of response time as a list of distributed values, which requires statistical calculation for better visualization and understandings.
Percentile in Statistics
In statistics, a percentile is a measurement used to indicate the relative position of a particular value within a dataset. It is a way of dividing a group of data into 100 equal parts, each representing a percentage.
To calculate a percentile, the data usually first be sorted in ascending order. And the percentile value is determined based on the position of the data value within the dataset.
For example:
- The first percentile (abbreviated as p1) represents the minimum 1% value in the dataset
- The 50th percentile (p50), also known as the median, represents the middle value in the dataset
- The 99th percentile (p99) represents a value below which 99% of the data falls
Response Time Percentile
It’s common to encounter average response time on a performance dashboard, however, average might be misleading as it could easily be affected by extreme cases.
While percentile is usually a better choice, as it excludes a specific amount of irrelevancy.
For example, the statement
the 75th percentile of response time is 500 μs
or
p75 response time is 500μs
indicates 75% of requests return in less than 500 μs, and the rest 25% of requests take longer than 500 μs.
To understand how bad are extreme cases are, higher percentiles: 95th, 99th, 99.9th percentiles come into play.
For example, the statement
the 99.9th percentile of this service is 1 ms
or
p999 response time of this service is 1 ms
indicates 99.9% of requests should take less than 1 ms, and we expect 0.01% might take longer.
High percentile in response time can also be used in Service Level Objective or Service Level Agreement, where service performance can be formally written.
If the agreed-upon target were to be missed, optimization should be called in to action, otherwise customers would demand a refund.