perf: tasks.set-status right behind a tasks.update can take 4.6 s on a loaded host (WebKit dev-02) #965

Open
opened 2026-11-05 15:30:55 +00:00 by kayg · 0 comments
Owner

Found by the flaky lane (U4) while fixing tasks-board.spec.ts:56 on #893.

Dropping a row on Someday is two writes to one task note: tasks.update (date cleared), then tasks.set-status. Request timeline from a failing WebKit run on dev-02 (ms since the first drop):

+3098 > tasks.update            +3185 < 200
+3194 > tasks.set-status        +3869 < 409 block_changed   (675 ms, then refused)
+4071 > tasks.set-status (retry) +8661 < 200                 (4590 ms)

The write does land, but after 5 s, which is the spec's expect.poll default. About 1 in 10 on dev-02 WebKit (1 of 20 on #893 before any change; 6 of 59 after the client-side retry fix). Chromium on dev-01 shows none in 20. The server's room holds the previous edit for flush_quiet (750 ms default) and the set-status then waits; the 4.6 s tail was measured while dev-02 ran load average 10 to 13 with IO pressure avg300 about 12%, so a slow fsync on the shared disk is the likely cause, but this has not been proven on a quiet host.

To do: measure tasks.set-status behind tasks.update on a perf VM (ABAB with dev, see the fsync note), and decide whether the second write should wait for the first's save or be one action. No timeout was raised and nothing was retried in the spec to hide this.

Found by the flaky lane (U4) while fixing `tasks-board.spec.ts:56` on #893. Dropping a row on Someday is two writes to one task note: `tasks.update` (date cleared), then `tasks.set-status`. Request timeline from a failing WebKit run on dev-02 (ms since the first drop): ``` +3098 > tasks.update +3185 < 200 +3194 > tasks.set-status +3869 < 409 block_changed (675 ms, then refused) +4071 > tasks.set-status (retry) +8661 < 200 (4590 ms) ``` The write does land, but after 5 s, which is the spec's `expect.poll` default. About 1 in 10 on dev-02 WebKit (1 of 20 on #893 before any change; 6 of 59 after the client-side retry fix). Chromium on dev-01 shows none in 20. The server's room holds the previous edit for `flush_quiet` (750 ms default) and the set-status then waits; the 4.6 s tail was measured while dev-02 ran load average 10 to 13 with IO pressure avg300 about 12%, so a slow `fsync` on the shared disk is the likely cause, but this has not been proven on a quiet host. To do: measure `tasks.set-status` behind `tasks.update` on a perf VM (ABAB with dev, see the fsync note), and decide whether the second write should wait for the first's save or be one action. No timeout was raised and nothing was retried in the spec to hide this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#965
No description provided.