1x4, 2x2 and 4x1 at 4 CPU and 2 GiB of API, workers equal to CPUs, 32 pool connections and 128 balancer slots in every layout, three repeats from 600 to 6 830 rps. All three keep up with the offered load up to 4 560 rps; the peaks are 5 375 rps for 1x4 (5 332..5 384), 4 964 for 2x2 (4 894..5 104) and 4 724 for 4x1 (4 686..4 794). At the peak the API uses 95 % of its four CPUs in every layout, PostgreSQL 82..89 % of its two, the balancer 40 % of one, and about half of the 32 database connections wait for the lock on a chat row. Smaller replicas cost more: at 3 040 rps the API burns 215 % CPU as 1x4, 243 % as 2x2 and about 280 % as 4x1, and p95 at 4 560 rps grows from 9 to 69 and 150 ms. The first attempt was aborted when a neighbour's image build froze the Docker API; its summary is kept under aborted/. Twelve steps of the rerun were rejected as disturbed and repeated. A config's SLO capacity now needs a majority of saturated repeats, since a median is robust to one disturbed repeat and "any repeat" is not. Series B starts at 450 rps per CPU. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
9.8 KiB
9.8 KiB
| 1 | ts | state | wait_event_type | wait_event | backends | max_connections |
|---|---|---|---|---|---|---|
| 2 | 1793217183 | idle | Client | ClientRead | 32 | 200 |
| 3 | 1793217184 | active | IO | WalSync | 1 | 200 |
| 4 | 1793217184 | active | LWLock | WALWrite | 3 | 200 |
| 5 | 1793217184 | active | Lock | transactionid | 8 | 200 |
| 6 | 1793217184 | active | Lock | tuple | 5 | 200 |
| 7 | 1793217184 | idle | 3 | 200 | ||
| 8 | 1793217184 | idle | Client | ClientRead | 3 | 200 |
| 9 | 1793217184 | idle in transaction | Client | ClientRead | 9 | 200 |
| 10 | 1793217185 | active | IO | WalSync | 1 | 200 |
| 11 | 1793217185 | active | LWLock | WALWrite | 7 | 200 |
| 12 | 1793217185 | active | Lock | transactionid | 10 | 200 |
| 13 | 1793217185 | active | Lock | tuple | 11 | 200 |
| 14 | 1793217185 | idle | Client | ClientRead | 2 | 200 |
| 15 | 1793217185 | idle in transaction | Client | ClientRead | 1 | 200 |
| 16 | 1793217187 | active | 1 | 200 | ||
| 17 | 1793217187 | active | Client | ClientRead | 1 | 200 |
| 18 | 1793217187 | active | Lock | transactionid | 8 | 200 |
| 19 | 1793217187 | active | Lock | tuple | 8 | 200 |
| 20 | 1793217187 | idle | Client | ClientRead | 3 | 200 |
| 21 | 1793217187 | idle in transaction | Client | ClientRead | 11 | 200 |
| 22 | 1793217188 | active | Client | ClientRead | 1 | 200 |
| 23 | 1793217188 | active | Lock | transactionid | 6 | 200 |
| 24 | 1793217188 | active | Lock | tuple | 12 | 200 |
| 25 | 1793217188 | idle | Client | ClientRead | 6 | 200 |
| 26 | 1793217188 | idle in transaction | Client | ClientRead | 7 | 200 |
| 27 | 1793217189 | active | 1 | 200 | ||
| 28 | 1793217189 | active | Lock | transactionid | 9 | 200 |
| 29 | 1793217189 | active | Lock | tuple | 8 | 200 |
| 30 | 1793217189 | idle | 1 | 200 | ||
| 31 | 1793217189 | idle | Client | ClientRead | 5 | 200 |
| 32 | 1793217189 | idle in transaction | Client | ClientRead | 8 | 200 |
| 33 | 1793217190 | active | 1 | 200 | ||
| 34 | 1793217190 | active | LWLock | WALWrite | 2 | 200 |
| 35 | 1793217190 | active | Lock | transactionid | 11 | 200 |
| 36 | 1793217190 | active | Lock | tuple | 7 | 200 |
| 37 | 1793217190 | idle | 1 | 200 | ||
| 38 | 1793217190 | idle | Client | ClientRead | 4 | 200 |
| 39 | 1793217190 | idle in transaction | 1 | 200 | ||
| 40 | 1793217190 | idle in transaction | Client | ClientRead | 5 | 200 |
| 41 | 1793217191 | active | 2 | 200 | ||
| 42 | 1793217191 | active | IO | WalSync | 1 | 200 |
| 43 | 1793217191 | active | LWLock | WALWrite | 3 | 200 |
| 44 | 1793217191 | active | Lock | transactionid | 10 | 200 |
| 45 | 1793217191 | active | Lock | tuple | 10 | 200 |
| 46 | 1793217191 | idle | Client | ClientRead | 2 | 200 |
| 47 | 1793217191 | idle in transaction | Client | ClientRead | 4 | 200 |
| 48 | 1793217192 | active | 1 | 200 | ||
| 49 | 1793217192 | active | Lock | transactionid | 9 | 200 |
| 50 | 1793217192 | active | Lock | tuple | 5 | 200 |
| 51 | 1793217192 | idle | Client | ClientRead | 7 | 200 |
| 52 | 1793217192 | idle in transaction | 1 | 200 | ||
| 53 | 1793217192 | idle in transaction | Client | ClientRead | 9 | 200 |
| 54 | 1793217193 | active | Client | ClientRead | 1 | 200 |
| 55 | 1793217193 | active | IO | WalSync | 2 | 200 |
| 56 | 1793217193 | active | LWLock | WALWrite | 3 | 200 |
| 57 | 1793217193 | active | Lock | transactionid | 7 | 200 |
| 58 | 1793217193 | active | Lock | tuple | 14 | 200 |
| 59 | 1793217193 | idle | 1 | 200 | ||
| 60 | 1793217193 | idle | Client | ClientRead | 3 | 200 |
| 61 | 1793217193 | idle in transaction | 1 | 200 | ||
| 62 | 1793217194 | active | IO | WalSync | 2 | 200 |
| 63 | 1793217194 | active | LWLock | WALWrite | 3 | 200 |
| 64 | 1793217194 | active | Lock | transactionid | 10 | 200 |
| 65 | 1793217194 | active | Lock | tuple | 5 | 200 |
| 66 | 1793217194 | idle | Client | ClientRead | 3 | 200 |
| 67 | 1793217194 | idle | Lock | transactionid | 1 | 200 |
| 68 | 1793217194 | idle | Lock | tuple | 2 | 200 |
| 69 | 1793217194 | idle in transaction | Client | ClientRead | 2 | 200 |
| 70 | 1793217194 | idle in transaction | LWLock | WALWrite | 2 | 200 |
| 71 | 1793217194 | idle in transaction | Lock | transactionid | 1 | 200 |
| 72 | 1793217194 | idle in transaction | Lock | tuple | 1 | 200 |
| 73 | 1793217196 | active | 1 | 200 | ||
| 74 | 1793217196 | active | IO | WalSync | 1 | 200 |
| 75 | 1793217196 | active | LWLock | WALWrite | 4 | 200 |
| 76 | 1793217196 | active | Lock | transactionid | 10 | 200 |
| 77 | 1793217196 | active | Lock | tuple | 10 | 200 |
| 78 | 1793217196 | idle | Client | ClientRead | 1 | 200 |
| 79 | 1793217196 | idle in transaction | Client | ClientRead | 5 | 200 |
| 80 | 1793217197 | active | Client | ClientRead | 3 | 200 |
| 81 | 1793217197 | active | Lock | transactionid | 8 | 200 |
| 82 | 1793217197 | active | Lock | tuple | 8 | 200 |
| 83 | 1793217197 | idle | Client | ClientRead | 4 | 200 |
| 84 | 1793217197 | idle | Lock | tuple | 1 | 200 |
| 85 | 1793217197 | idle in transaction | 2 | 200 | ||
| 86 | 1793217197 | idle in transaction | Client | ClientRead | 1 | 200 |
| 87 | 1793217197 | idle in transaction | IO | WalSync | 2 | 200 |
| 88 | 1793217197 | idle in transaction | LWLock | WALWrite | 1 | 200 |
| 89 | 1793217197 | idle in transaction | Lock | transactionid | 1 | 200 |
| 90 | 1793217197 | idle in transaction | Lock | tuple | 1 | 200 |
| 91 | 1793217198 | active | 1 | 200 | ||
| 92 | 1793217198 | active | Lock | transactionid | 8 | 200 |
| 93 | 1793217198 | active | Lock | tuple | 10 | 200 |
| 94 | 1793217198 | idle | Client | ClientRead | 6 | 200 |
| 95 | 1793217198 | idle in transaction | Client | ClientRead | 7 | 200 |
| 96 | 1793217199 | active | IO | WalSync | 1 | 200 |
| 97 | 1793217199 | active | LWLock | WALWrite | 1 | 200 |
| 98 | 1793217199 | active | Lock | transactionid | 9 | 200 |
| 99 | 1793217199 | active | Lock | tuple | 8 | 200 |
| 100 | 1793217199 | idle | 1 | 200 | ||
| 101 | 1793217199 | idle | Client | ClientRead | 2 | 200 |
| 102 | 1793217199 | idle in transaction | Client | ClientRead | 7 | 200 |
| 103 | 1793217199 | idle in transaction | LWLock | WALWrite | 3 | 200 |
| 104 | 1793217200 | active | Client | ClientRead | 1 | 200 |
| 105 | 1793217200 | active | LWLock | WALWrite | 1 | 200 |
| 106 | 1793217200 | active | Lock | transactionid | 8 | 200 |
| 107 | 1793217200 | active | Lock | tuple | 12 | 200 |
| 108 | 1793217200 | idle | Client | ClientRead | 3 | 200 |
| 109 | 1793217200 | idle in transaction | 1 | 200 | ||
| 110 | 1793217200 | idle in transaction | Client | ClientRead | 6 | 200 |
| 111 | 1793217201 | active | IO | WalSync | 1 | 200 |
| 112 | 1793217201 | active | LWLock | WALWrite | 4 | 200 |
| 113 | 1793217201 | active | Lock | transactionid | 10 | 200 |
| 114 | 1793217201 | active | Lock | tuple | 7 | 200 |
| 115 | 1793217201 | idle | Client | ClientRead | 6 | 200 |
| 116 | 1793217201 | idle in transaction | Client | ClientRead | 4 | 200 |
| 117 | 1793217202 | active | IO | WalSync | 1 | 200 |
| 118 | 1793217202 | active | LWLock | WALWrite | 6 | 200 |
| 119 | 1793217202 | active | Lock | transactionid | 10 | 200 |
| 120 | 1793217202 | active | Lock | tuple | 12 | 200 |
| 121 | 1793217202 | idle in transaction | Client | ClientRead | 2 | 200 |
| 122 | 1793217202 | idle in transaction | LWLock | WALWrite | 1 | 200 |
| 123 | 1793217204 | active | Client | ClientRead | 1 | 200 |
| 124 | 1793217204 | active | LWLock | WALWrite | 1 | 200 |
| 125 | 1793217204 | active | Lock | transactionid | 11 | 200 |
| 126 | 1793217204 | active | Lock | tuple | 4 | 200 |
| 127 | 1793217204 | idle | 1 | 200 | ||
| 128 | 1793217204 | idle | Client | ClientRead | 4 | 200 |
| 129 | 1793217204 | idle in transaction | Client | ClientRead | 10 | 200 |
| 130 | 1793217205 | active | 3 | 200 | ||
| 131 | 1793217205 | active | IO | WalSync | 1 | 200 |
| 132 | 1793217205 | active | LWLock | WALWrite | 2 | 200 |
| 133 | 1793217205 | active | Lock | transactionid | 11 | 200 |
| 134 | 1793217205 | active | Lock | tuple | 4 | 200 |
| 135 | 1793217205 | idle | Client | ClientRead | 6 | 200 |
| 136 | 1793217205 | idle in transaction | Client | ClientRead | 5 | 200 |
| 137 | 1793217206 | active | 1 | 200 | ||
| 138 | 1793217206 | active | LWLock | WALWrite | 1 | 200 |
| 139 | 1793217206 | active | Lock | transactionid | 5 | 200 |
| 140 | 1793217206 | active | Lock | tuple | 10 | 200 |
| 141 | 1793217206 | idle | 1 | 200 | ||
| 142 | 1793217206 | idle | Client | ClientRead | 8 | 200 |
| 143 | 1793217206 | idle in transaction | Client | ClientRead | 6 | 200 |
| 144 | 1793217207 | active | 1 | 200 | ||
| 145 | 1793217207 | active | Client | ClientRead | 4 | 200 |
| 146 | 1793217207 | active | LWLock | WALWrite | 1 | 200 |
| 147 | 1793217207 | active | Lock | transactionid | 11 | 200 |
| 148 | 1793217207 | active | Lock | tuple | 3 | 200 |
| 149 | 1793217207 | idle | 1 | 200 | ||
| 150 | 1793217207 | idle | Client | ClientRead | 6 | 200 |
| 151 | 1793217207 | idle in transaction | 1 | 200 | ||
| 152 | 1793217207 | idle in transaction | Client | ClientRead | 4 | 200 |
| 153 | 1793217208 | active | 1 | 200 | ||
| 154 | 1793217208 | active | IO | WalSync | 1 | 200 |
| 155 | 1793217208 | active | LWLock | WALWrite | 1 | 200 |
| 156 | 1793217208 | active | Lock | transactionid | 8 | 200 |
| 157 | 1793217208 | active | Lock | tuple | 9 | 200 |
| 158 | 1793217208 | idle | Client | ClientRead | 6 | 200 |
| 159 | 1793217208 | idle in transaction | Client | ClientRead | 6 | 200 |
| 160 | 1793217209 | active | Client | ClientRead | 2 | 200 |
| 161 | 1793217209 | active | Lock | transactionid | 8 | 200 |
| 162 | 1793217209 | active | Lock | tuple | 7 | 200 |
| 163 | 1793217209 | idle | 2 | 200 | ||
| 164 | 1793217209 | idle | Client | ClientRead | 7 | 200 |
| 165 | 1793217209 | idle in transaction | Client | ClientRead | 6 | 200 |
| 166 | 1793217210 | active | 2 | 200 | ||
| 167 | 1793217210 | active | IO | WalSync | 1 | 200 |
| 168 | 1793217210 | active | Lock | transactionid | 8 | 200 |
| 169 | 1793217210 | active | Lock | tuple | 6 | 200 |
| 170 | 1793217210 | idle | Client | ClientRead | 6 | 200 |
| 171 | 1793217210 | idle in transaction | Client | ClientRead | 8 | 200 |
| 172 | 1793217212 | active | Client | ClientRead | 1 | 200 |
| 173 | 1793217212 | active | Lock | transactionid | 5 | 200 |
| 174 | 1793217212 | active | Lock | tuple | 9 | 200 |
| 175 | 1793217212 | idle | 1 | 200 | ||
| 176 | 1793217212 | idle | Client | ClientRead | 7 | 200 |
| 177 | 1793217212 | idle in transaction | 1 | 200 | ||
| 178 | 1793217212 | idle in transaction | Client | ClientRead | 7 | 200 |
| 179 | 1793217212 | idle in transaction | IO | WalWrite | 1 | 200 |
| 180 | 1793217213 | active | 2 | 200 | ||
| 181 | 1793217213 | active | Client | ClientRead | 9 | 200 |
| 182 | 1793217213 | active | IO | WalSync | 1 | 200 |
| 183 | 1793217213 | active | LWLock | WALWrite | 1 | 200 |
| 184 | 1793217213 | active | Lock | transactionid | 10 | 200 |
| 185 | 1793217213 | active | Lock | tuple | 7 | 200 |
| 186 | 1793217213 | idle | Client | ClientRead | 1 | 200 |
| 187 | 1793217213 | idle in transaction | Lock | transactionid | 1 | 200 |
| 188 | 1793217214 | active | Lock | transactionid | 8 | 200 |
| 189 | 1793217214 | active | Lock | tuple | 10 | 200 |
| 190 | 1793217214 | idle | 1 | 200 | ||
| 191 | 1793217214 | idle | Client | ClientRead | 4 | 200 |
| 192 | 1793217214 | idle in transaction | Client | ClientRead | 9 | 200 |
| 193 | 1793217215 | active | IO | WalSync | 1 | 200 |
| 194 | 1793217215 | active | LWLock | WALWrite | 5 | 200 |
| 195 | 1793217215 | active | Lock | transactionid | 10 | 200 |
| 196 | 1793217215 | active | Lock | tuple | 11 | 200 |
| 197 | 1793217215 | idle | Client | ClientRead | 1 | 200 |
| 198 | 1793217215 | idle in transaction | 1 | 200 | ||
| 199 | 1793217215 | idle in transaction | Client | ClientRead | 3 | 200 |
| 200 | 1793217216 | active | Client | ClientRead | 1 | 200 |
| 201 | 1793217216 | active | IO | WalSync | 1 | 200 |
| 202 | 1793217216 | active | Lock | transactionid | 8 | 200 |
| 203 | 1793217216 | active | Lock | tuple | 6 | 200 |
| 204 | 1793217216 | idle | 1 | 200 | ||
| 205 | 1793217216 | idle | Client | ClientRead | 7 | 200 |
| 206 | 1793217216 | idle in transaction | Client | ClientRead | 8 | 200 |
| 207 | 1793217217 | active | Client | ClientRead | 1 | 200 |
| 208 | 1793217217 | active | IO | WalSync | 1 | 200 |
| 209 | 1793217217 | active | LWLock | BufferContent | 1 | 200 |
| 210 | 1793217217 | active | Lock | transactionid | 10 | 200 |
| 211 | 1793217217 | active | Lock | tuple | 6 | 200 |
| 212 | 1793217217 | idle | Client | ClientRead | 6 | 200 |
| 213 | 1793217217 | idle in transaction | 1 | 200 | ||
| 214 | 1793217217 | idle in transaction | Client | ClientRead | 6 | 200 |
| 215 | 1793217218 | active | 1 | 200 | ||
| 216 | 1793217218 | active | Lock | transactionid | 6 | 200 |
| 217 | 1793217218 | active | Lock | tuple | 11 | 200 |
| 218 | 1793217218 | idle | Client | ClientRead | 7 | 200 |
| 219 | 1793217218 | idle in transaction | 1 | 200 | ||
| 220 | 1793217218 | idle in transaction | Client | ClientRead | 6 | 200 |
| 221 | 1793217220 | active | Client | ClientRead | 1 | 200 |
| 222 | 1793217220 | active | Lock | transactionid | 8 | 200 |
| 223 | 1793217220 | active | Lock | tuple | 5 | 200 |
| 224 | 1793217220 | idle | Client | ClientRead | 10 | 200 |
| 225 | 1793217220 | idle in transaction | Client | ClientRead | 5 | 200 |
| 226 | 1793217220 | idle in transaction | IO | WalSync | 1 | 200 |
| 227 | 1793217220 | idle in transaction | LWLock | WALWrite | 2 | 200 |
| 228 | 1793217221 | active | IO | WalSync | 1 | 200 |
| 229 | 1793217221 | active | LWLock | WALWrite | 7 | 200 |
| 230 | 1793217221 | active | Lock | transactionid | 11 | 200 |
| 231 | 1793217221 | active | Lock | tuple | 9 | 200 |
| 232 | 1793217221 | idle | Client | ClientRead | 2 | 200 |
| 233 | 1793217221 | idle in transaction | Client | ClientRead | 2 | 200 |
| 234 | 1793217222 | active | 1 | 200 | ||
| 235 | 1793217222 | active | Lock | transactionid | 7 | 200 |
| 236 | 1793217222 | active | Lock | tuple | 8 | 200 |
| 237 | 1793217222 | idle | 1 | 200 | ||
| 238 | 1793217222 | idle | Client | ClientRead | 5 | 200 |
| 239 | 1793217222 | idle in transaction | Client | ClientRead | 10 | 200 |
| 240 | 1793217223 | active | 2 | 200 | ||
| 241 | 1793217223 | active | Client | ClientRead | 1 | 200 |
| 242 | 1793217223 | active | Lock | transactionid | 11 | 200 |
| 243 | 1793217223 | active | Lock | tuple | 1 | 200 |
| 244 | 1793217223 | idle | Client | ClientRead | 8 | 200 |
| 245 | 1793217223 | idle in transaction | 2 | 200 | ||
| 246 | 1793217223 | idle in transaction | Client | ClientRead | 7 | 200 |
| 247 | 1793217224 | idle | Client | ClientRead | 32 | 200 |