liveBook · Manning

Percentile

As explained in Troubleshooting Java, Second Edition

P95 latency is the response-time value at or below which 95 percent of measured requests complete.

P95 latency is the response-time value at or below which 95% of measured requests complete; the slowest 5% take longer. It reveals intermittent slowness that averages can hide. section 12.3.3

Use P95 latency to investigate:

  • Timeout mismatches, especially when P95 approaches or exceeds the client timeout. section 12.3.3
  • Load-related slowdowns, exhausted thread pools, slower database queries, resource starvation, and GC delays. section 12.3.3
  • Deployment regressions affecting complex requests or other intermittent failure patterns. section 12.3.3

A two-second timeout

Suppose a client timeout is 2,000 ms while downstream P95 latency is 2.5 seconds. The average may look acceptable, but roughly 5% of requests exceed the timeout, causing client errors even when the server eventually completes processing. Compare client-request duration with server-processing time in traces or logs. section 12.3.3

Figure 12.9 Identifying timeout mismatches using percentiles. P95 and P99 latencies approach or exceed the 2000 ms timeout threshold, revealing that some requests are likely to fail—despite the service working as expected.

Use the percentile comparison to see how P95 and P99 approach or exceed the 2,000 ms timeout threshold. section 12.3.3

How Troubleshooting Java, Second Edition covers it

How deep it goes
Defines P95, contrasts it with averages and P99, and applies it to timeout and performance investigations.
Examples
Uses a 2,000-millisecond client timeout, 2.5-second downstream P95, and traces comparing client and server durations.
What it assumes
Assumes measured request durations, then defines percentile latency before applying it to service failures.
What you can do after
Diagnose timeout mismatches and intermittent slowdowns by comparing percentile latency with configured thresholds.
How it connects
Connects P95 latency with P99 latency, timeouts, retries, cascading failures, resource starvation, and distributed tracing.

Also explained in

Compare how 7 books explain percentile →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Troubleshooting Java, Second Edition. The section links point to the parts of the book it draws on.