Record the before and after comparison of track 1

8x1 with the image of edc091d (before) and the one-statement write
(after), alternating per repeat, three repeats at 3 600, 5 400 and
8 100 rps. At 3 600 rps, below the knee, p95 falls from 64.5 ms
(35.7..142.5) to 3.7 ms (2.8..5.4) and p99 from 122 to 13 ms; the API
spends 391 instead of 457 % CPU and PostgreSQL 102 instead of 137 %;
connections waiting for a chat lock drop from 12.8 to 0.15 and none is
idle in transaction any more. Past the knee the peak rises from 4 252
(4 054..4 396) to 4 894 rps (4 494..5 104), +15 %, and at 8 100 rps
from 4 104 to 4 841 (+18 %); the ranges do not overlap. Saturated, the
lock holders now wait for the WAL flush (LWLock WALWrite) instead of
the application.

The switch to the after image for the third repeat failed in compose
while another lab was running tests on the shared VM, so that repeat
was run alone with --first-repeat 3 on the same database; apply now
retries compose up twice and prints its stderr. Two after rows were
still marked disturbed after three reruns and are kept; they are the
lower ones.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
This commit is contained in:
Artyom
2026-10-29 01:37:34 +03:00
co-authored by Claude Opus 5.5
parent 296e070eba
commit dde113b4ed
131 changed files with 20158 additions and 3 deletions
@@ -0,0 +1,188 @@
ts,state,wait_event_type,wait_event,backends,max_connections
1793225241,idle,Client,ClientRead,8,200
1793225242,active,,,2,200
1793225242,active,Client,ClientRead,5,200
1793225242,active,LWLock,LockManager,1,200
1793225242,active,LWLock,WALWrite,4,200
1793225242,active,Lock,transactionid,18,200
1793225242,active,Lock,tuple,26,200
1793225242,idle,Client,ClientRead,2,200
1793225242,idle in transaction,Client,ClientRead,6,200
1793225243,active,Client,ClientRead,1,200
1793225243,idle,Client,ClientRead,62,200
1793225243,idle in transaction,Client,ClientRead,1,200
1793225244,active,,,1,200
1793225244,active,IO,WalSync,1,200
1793225244,active,LWLock,WALWrite,1,200
1793225244,idle,Client,ClientRead,60,200
1793225244,idle in transaction,Client,ClientRead,1,200
1793225245,active,,,1,200
1793225245,active,LWLock,LockManager,1,200
1793225245,idle,Client,ClientRead,58,200
1793225245,idle in transaction,,,1,200
1793225245,idle in transaction,Client,ClientRead,3,200
1793225246,active,Lock,transactionid,3,200
1793225246,active,Lock,tuple,57,200
1793225246,idle,Client,ClientRead,1,200
1793225246,idle in transaction,Client,ClientRead,3,200
1793225248,active,Client,ClientRead,1,200
1793225248,active,IO,WalSync,1,200
1793225248,active,LWLock,WALWrite,5,200
1793225248,active,Lock,transactionid,3,200
1793225248,idle,Client,ClientRead,52,200
1793225248,idle in transaction,,,1,200
1793225248,idle in transaction,Client,ClientRead,1,200
1793225249,active,,,2,200
1793225249,active,IO,WalSync,1,200
1793225249,idle,Client,ClientRead,57,200
1793225249,idle in transaction,Client,ClientRead,4,200
1793225250,active,,,2,200
1793225250,active,IO,WalSync,1,200
1793225250,active,LWLock,WALWrite,1,200
1793225250,idle,Client,ClientRead,57,200
1793225250,idle in transaction,,,1,200
1793225250,idle in transaction,Client,ClientRead,2,200
1793225251,active,,,1,200
1793225251,active,IO,WalSync,1,200
1793225251,idle,,,1,200
1793225251,idle,Client,ClientRead,60,200
1793225251,idle in transaction,,,1,200
1793225252,active,,,1,200
1793225252,active,IO,WalSync,1,200
1793225252,idle,Client,ClientRead,62,200
1793225253,active,IO,WalSync,1,200
1793225253,active,Lock,transactionid,1,200
1793225253,idle,Client,ClientRead,60,200
1793225253,idle in transaction,Client,ClientRead,2,200
1793225254,active,,,2,200
1793225254,active,IO,WalSync,1,200
1793225254,active,LWLock,WALWrite,2,200
1793225254,active,Lock,transactionid,1,200
1793225254,idle,Client,ClientRead,54,200
1793225254,idle in transaction,,,1,200
1793225254,idle in transaction,Client,ClientRead,2,200
1793225254,idle in transaction,Lock,transactionid,1,200
1793225256,active,Client,ClientRead,1,200
1793225256,idle,Client,ClientRead,60,200
1793225256,idle in transaction,,,1,200
1793225256,idle in transaction,Client,ClientRead,1,200
1793225256,idle in transaction,IO,WalSync,1,200
1793225257,active,,,1,200
1793225257,active,IO,WalSync,1,200
1793225257,active,LWLock,WALWrite,6,200
1793225257,active,Lock,transactionid,23,200
1793225257,active,Lock,tuple,26,200
1793225257,idle,Client,ClientRead,5,200
1793225257,idle in transaction,Client,ClientRead,2,200
1793225258,active,,,1,200
1793225258,active,LWLock,LockManager,1,200
1793225258,active,LWLock,WALWrite,3,200
1793225258,active,Lock,transactionid,4,200
1793225258,active,Lock,tuple,1,200
1793225258,idle,,,1,200
1793225258,idle,Client,ClientRead,49,200
1793225258,idle in transaction,,,1,200
1793225258,idle in transaction,Client,ClientRead,2,200
1793225258,idle in transaction,LWLock,WALWrite,1,200
1793225259,active,IO,WalSync,1,200
1793225259,active,LWLock,WALWrite,6,200
1793225259,active,Lock,transactionid,1,200
1793225259,idle,,,1,200
1793225259,idle,Client,ClientRead,55,200
1793225260,active,IO,WalSync,1,200
1793225260,active,LWLock,WALWrite,2,200
1793225260,active,Lock,transactionid,2,200
1793225260,idle,,,1,200
1793225260,idle,Client,ClientRead,54,200
1793225260,idle in transaction,Client,ClientRead,4,200
1793225261,active,IO,WalSync,1,200
1793225261,active,LWLock,WALWrite,3,200
1793225261,active,Lock,transactionid,4,200
1793225261,idle,Client,ClientRead,53,200
1793225261,idle in transaction,Client,ClientRead,3,200
1793225262,active,Client,ClientRead,2,200
1793225262,active,LWLock,WALWrite,2,200
1793225262,active,Lock,transactionid,19,200
1793225262,active,Lock,tuple,25,200
1793225262,idle,Client,ClientRead,9,200
1793225262,idle in transaction,,,1,200
1793225262,idle in transaction,Client,ClientRead,6,200
1793225264,active,Client,ClientRead,1,200
1793225264,active,IO,WalSync,1,200
1793225264,active,LWLock,WALWrite,7,200
1793225264,active,Lock,transactionid,4,200
1793225264,idle,Client,ClientRead,50,200
1793225264,idle in transaction,LWLock,WALWrite,1,200
1793225265,active,Client,ClientRead,1,200
1793225265,active,IO,WalSync,1,200
1793225265,active,LWLock,WALWrite,3,200
1793225265,active,Lock,transactionid,1,200
1793225265,idle,,,1,200
1793225265,idle,Client,ClientRead,53,200
1793225265,idle in transaction,Client,ClientRead,4,200
1793225266,idle,Client,ClientRead,60,200
1793225266,idle in transaction,,,2,200
1793225266,idle in transaction,Client,ClientRead,2,200
1793225267,active,IO,WalSync,1,200
1793225267,active,LWLock,WALWrite,1,200
1793225267,idle,,,1,200
1793225267,idle,Client,ClientRead,60,200
1793225267,idle in transaction,Client,ClientRead,1,200
1793225268,active,,,1,200
1793225268,active,Client,ClientRead,1,200
1793225268,active,IO,WalSync,1,200
1793225268,active,LWLock,ProcArray,1,200
1793225268,active,Lock,transactionid,1,200
1793225268,idle,,,1,200
1793225268,idle,Client,ClientRead,58,200
1793225269,active,,,2,200
1793225269,active,Client,ClientRead,1,200
1793225269,idle,Client,ClientRead,56,200
1793225269,idle in transaction,,,1,200
1793225269,idle in transaction,Client,ClientRead,3,200
1793225269,idle in transaction,IO,WalSync,1,200
1793225270,idle,Client,ClientRead,59,200
1793225270,idle in transaction,Client,ClientRead,5,200
1793225272,active,IO,WalSync,1,200
1793225272,active,LWLock,WALWrite,2,200
1793225272,idle,,,1,200
1793225272,idle,Client,ClientRead,58,200
1793225272,idle in transaction,Client,ClientRead,2,200
1793225273,active,,,1,200
1793225273,active,Client,ClientRead,1,200
1793225273,active,IO,WalSync,1,200
1793225273,active,LWLock,WALWrite,1,200
1793225273,active,Lock,transactionid,14,200
1793225273,active,Lock,tuple,31,200
1793225273,idle,Client,ClientRead,8,200
1793225273,idle in transaction,,,1,200
1793225273,idle in transaction,Client,ClientRead,6,200
1793225274,active,,,1,200
1793225274,active,Client,ClientRead,2,200
1793225274,active,LWLock,WALWrite,2,200
1793225274,active,Lock,transactionid,1,200
1793225274,idle,,,2,200
1793225274,idle,Client,ClientRead,55,200
1793225274,idle in transaction,Client,ClientRead,1,200
1793225275,active,Client,ClientRead,2,200
1793225275,active,IO,WalSync,1,200
1793225275,idle,Client,ClientRead,59,200
1793225275,idle in transaction,Client,ClientRead,2,200
1793225276,idle,Client,ClientRead,64,200
1793225277,active,,,1,200
1793225277,idle,Client,ClientRead,59,200
1793225277,idle in transaction,,,1,200
1793225277,idle in transaction,Client,ClientRead,3,200
1793225278,idle,Client,ClientRead,58,200
1793225278,idle in transaction,,,1,200
1793225278,idle in transaction,Client,ClientRead,5,200
1793225280,active,Client,ClientRead,1,200
1793225280,active,IO,WalSync,1,200
1793225280,active,LWLock,WALWrite,2,200
1793225280,idle,,,1,200
1793225280,idle,Client,ClientRead,56,200
1793225280,idle in transaction,Client,ClientRead,3,200
1793225281,active,,,1,200
1793225281,idle,Client,ClientRead,55,200
1793225281,idle in transaction,Client,ClientRead,8,200
1793225282,idle,Client,ClientRead,64,200
1 ts state wait_event_type wait_event backends max_connections
2 1793225241 idle Client ClientRead 8 200
3 1793225242 active 2 200
4 1793225242 active Client ClientRead 5 200
5 1793225242 active LWLock LockManager 1 200
6 1793225242 active LWLock WALWrite 4 200
7 1793225242 active Lock transactionid 18 200
8 1793225242 active Lock tuple 26 200
9 1793225242 idle Client ClientRead 2 200
10 1793225242 idle in transaction Client ClientRead 6 200
11 1793225243 active Client ClientRead 1 200
12 1793225243 idle Client ClientRead 62 200
13 1793225243 idle in transaction Client ClientRead 1 200
14 1793225244 active 1 200
15 1793225244 active IO WalSync 1 200
16 1793225244 active LWLock WALWrite 1 200
17 1793225244 idle Client ClientRead 60 200
18 1793225244 idle in transaction Client ClientRead 1 200
19 1793225245 active 1 200
20 1793225245 active LWLock LockManager 1 200
21 1793225245 idle Client ClientRead 58 200
22 1793225245 idle in transaction 1 200
23 1793225245 idle in transaction Client ClientRead 3 200
24 1793225246 active Lock transactionid 3 200
25 1793225246 active Lock tuple 57 200
26 1793225246 idle Client ClientRead 1 200
27 1793225246 idle in transaction Client ClientRead 3 200
28 1793225248 active Client ClientRead 1 200
29 1793225248 active IO WalSync 1 200
30 1793225248 active LWLock WALWrite 5 200
31 1793225248 active Lock transactionid 3 200
32 1793225248 idle Client ClientRead 52 200
33 1793225248 idle in transaction 1 200
34 1793225248 idle in transaction Client ClientRead 1 200
35 1793225249 active 2 200
36 1793225249 active IO WalSync 1 200
37 1793225249 idle Client ClientRead 57 200
38 1793225249 idle in transaction Client ClientRead 4 200
39 1793225250 active 2 200
40 1793225250 active IO WalSync 1 200
41 1793225250 active LWLock WALWrite 1 200
42 1793225250 idle Client ClientRead 57 200
43 1793225250 idle in transaction 1 200
44 1793225250 idle in transaction Client ClientRead 2 200
45 1793225251 active 1 200
46 1793225251 active IO WalSync 1 200
47 1793225251 idle 1 200
48 1793225251 idle Client ClientRead 60 200
49 1793225251 idle in transaction 1 200
50 1793225252 active 1 200
51 1793225252 active IO WalSync 1 200
52 1793225252 idle Client ClientRead 62 200
53 1793225253 active IO WalSync 1 200
54 1793225253 active Lock transactionid 1 200
55 1793225253 idle Client ClientRead 60 200
56 1793225253 idle in transaction Client ClientRead 2 200
57 1793225254 active 2 200
58 1793225254 active IO WalSync 1 200
59 1793225254 active LWLock WALWrite 2 200
60 1793225254 active Lock transactionid 1 200
61 1793225254 idle Client ClientRead 54 200
62 1793225254 idle in transaction 1 200
63 1793225254 idle in transaction Client ClientRead 2 200
64 1793225254 idle in transaction Lock transactionid 1 200
65 1793225256 active Client ClientRead 1 200
66 1793225256 idle Client ClientRead 60 200
67 1793225256 idle in transaction 1 200
68 1793225256 idle in transaction Client ClientRead 1 200
69 1793225256 idle in transaction IO WalSync 1 200
70 1793225257 active 1 200
71 1793225257 active IO WalSync 1 200
72 1793225257 active LWLock WALWrite 6 200
73 1793225257 active Lock transactionid 23 200
74 1793225257 active Lock tuple 26 200
75 1793225257 idle Client ClientRead 5 200
76 1793225257 idle in transaction Client ClientRead 2 200
77 1793225258 active 1 200
78 1793225258 active LWLock LockManager 1 200
79 1793225258 active LWLock WALWrite 3 200
80 1793225258 active Lock transactionid 4 200
81 1793225258 active Lock tuple 1 200
82 1793225258 idle 1 200
83 1793225258 idle Client ClientRead 49 200
84 1793225258 idle in transaction 1 200
85 1793225258 idle in transaction Client ClientRead 2 200
86 1793225258 idle in transaction LWLock WALWrite 1 200
87 1793225259 active IO WalSync 1 200
88 1793225259 active LWLock WALWrite 6 200
89 1793225259 active Lock transactionid 1 200
90 1793225259 idle 1 200
91 1793225259 idle Client ClientRead 55 200
92 1793225260 active IO WalSync 1 200
93 1793225260 active LWLock WALWrite 2 200
94 1793225260 active Lock transactionid 2 200
95 1793225260 idle 1 200
96 1793225260 idle Client ClientRead 54 200
97 1793225260 idle in transaction Client ClientRead 4 200
98 1793225261 active IO WalSync 1 200
99 1793225261 active LWLock WALWrite 3 200
100 1793225261 active Lock transactionid 4 200
101 1793225261 idle Client ClientRead 53 200
102 1793225261 idle in transaction Client ClientRead 3 200
103 1793225262 active Client ClientRead 2 200
104 1793225262 active LWLock WALWrite 2 200
105 1793225262 active Lock transactionid 19 200
106 1793225262 active Lock tuple 25 200
107 1793225262 idle Client ClientRead 9 200
108 1793225262 idle in transaction 1 200
109 1793225262 idle in transaction Client ClientRead 6 200
110 1793225264 active Client ClientRead 1 200
111 1793225264 active IO WalSync 1 200
112 1793225264 active LWLock WALWrite 7 200
113 1793225264 active Lock transactionid 4 200
114 1793225264 idle Client ClientRead 50 200
115 1793225264 idle in transaction LWLock WALWrite 1 200
116 1793225265 active Client ClientRead 1 200
117 1793225265 active IO WalSync 1 200
118 1793225265 active LWLock WALWrite 3 200
119 1793225265 active Lock transactionid 1 200
120 1793225265 idle 1 200
121 1793225265 idle Client ClientRead 53 200
122 1793225265 idle in transaction Client ClientRead 4 200
123 1793225266 idle Client ClientRead 60 200
124 1793225266 idle in transaction 2 200
125 1793225266 idle in transaction Client ClientRead 2 200
126 1793225267 active IO WalSync 1 200
127 1793225267 active LWLock WALWrite 1 200
128 1793225267 idle 1 200
129 1793225267 idle Client ClientRead 60 200
130 1793225267 idle in transaction Client ClientRead 1 200
131 1793225268 active 1 200
132 1793225268 active Client ClientRead 1 200
133 1793225268 active IO WalSync 1 200
134 1793225268 active LWLock ProcArray 1 200
135 1793225268 active Lock transactionid 1 200
136 1793225268 idle 1 200
137 1793225268 idle Client ClientRead 58 200
138 1793225269 active 2 200
139 1793225269 active Client ClientRead 1 200
140 1793225269 idle Client ClientRead 56 200
141 1793225269 idle in transaction 1 200
142 1793225269 idle in transaction Client ClientRead 3 200
143 1793225269 idle in transaction IO WalSync 1 200
144 1793225270 idle Client ClientRead 59 200
145 1793225270 idle in transaction Client ClientRead 5 200
146 1793225272 active IO WalSync 1 200
147 1793225272 active LWLock WALWrite 2 200
148 1793225272 idle 1 200
149 1793225272 idle Client ClientRead 58 200
150 1793225272 idle in transaction Client ClientRead 2 200
151 1793225273 active 1 200
152 1793225273 active Client ClientRead 1 200
153 1793225273 active IO WalSync 1 200
154 1793225273 active LWLock WALWrite 1 200
155 1793225273 active Lock transactionid 14 200
156 1793225273 active Lock tuple 31 200
157 1793225273 idle Client ClientRead 8 200
158 1793225273 idle in transaction 1 200
159 1793225273 idle in transaction Client ClientRead 6 200
160 1793225274 active 1 200
161 1793225274 active Client ClientRead 2 200
162 1793225274 active LWLock WALWrite 2 200
163 1793225274 active Lock transactionid 1 200
164 1793225274 idle 2 200
165 1793225274 idle Client ClientRead 55 200
166 1793225274 idle in transaction Client ClientRead 1 200
167 1793225275 active Client ClientRead 2 200
168 1793225275 active IO WalSync 1 200
169 1793225275 idle Client ClientRead 59 200
170 1793225275 idle in transaction Client ClientRead 2 200
171 1793225276 idle Client ClientRead 64 200
172 1793225277 active 1 200
173 1793225277 idle Client ClientRead 59 200
174 1793225277 idle in transaction 1 200
175 1793225277 idle in transaction Client ClientRead 3 200
176 1793225278 idle Client ClientRead 58 200
177 1793225278 idle in transaction 1 200
178 1793225278 idle in transaction Client ClientRead 5 200
179 1793225280 active Client ClientRead 1 200
180 1793225280 active IO WalSync 1 200
181 1793225280 active LWLock WALWrite 2 200
182 1793225280 idle 1 200
183 1793225280 idle Client ClientRead 56 200
184 1793225280 idle in transaction Client ClientRead 3 200
185 1793225281 active 1 200
186 1793225281 idle Client ClientRead 55 200
187 1793225281 idle in transaction Client ClientRead 8 200
188 1793225282 idle Client ClientRead 64 200