pool.acquire
- payload = build_payload(request)
- with pool.acquire() as conn:
- result = query_database(conn, payload)
- query_ms = 70
- lookups_per_sec =
- Query70 ms, and it stays there
- Acquire p958 ms. The bar is 50 ms.
- Lookups560 a second into a pool of 40
Acquire time
Each bar is a recent wait for a connection. Query time stays at 70 ms.
n=0
Acquire samples collect once the run starts. The query mark stays at 70 ms.
Query 70 ms. Acquire p95 8 ms. The pass bar is 50 ms.
Live metrics
ReadyThe query hold stays at 70 ms. Acquire p95 rises and falls with the offered lookup rate.
Metric definitions
| Metric | Value | What it means |
|---|---|---|
| Query | 70 ms | Time a connection is held. This stays at 70 ms. |
| Acquire p95 | 8 ms | Wait for a connection. Hold this under 50 ms. |
| Lookups | 560/s | Offered to the 40-connection pool. 400/s passes. 560/s does not. |
| Demand | 39 | Lookups per second times 70 ms, in connections. The pool holds 40. |
70 ms
8 ms
560/s
39