What period is P99 or P95 calculated over?

Viewed 697

When committing to/setting SLAs for a service, what time period should the SLA be calculated over?

For example, if I wanted all the services in my organization to commit to P95 latency, and one of the services commits to 500ms, what is the time window - because the P95 will be different based on the time window we look at.

1 Answers

Depends on in what cycles your latency fluctuates.

No daily / hourly peaks? A couple thousand samples do just fine.

Daily fluctuations (e.g. peak usage, concurrent backups etc.)? Then you will need to measure at least a whole day.

Weekly fluctuations (e.g. tied to work hours or evening activities etc.)? Then you will need to sample over a full week.

There is no strict requirement to sample everything over the chosen time window, but your time window better be representative or you may be held liable. Also make sure to be fair when you under-sample.

If you want to be on the safe side, take the worst-case-scenario in your load cycle, and within that scenario take a full minute worth of samples. That gives you a good estimate what will be held against you.

Related