Roll out event-path CPU fixes (R1 worker pin/drain thread, R2 gateway relay) vd03 → QA → PROD #236

Open
opened 2026-11-21 08:01:07 -05:00 by dohertj2 · 3 comments
Owner

Deploy gate for the ~240 ev/s worker CPU fix. Plan: docs/plans/2026-11-21-worker-perf-rollout.md (on feat/worker-perf-prototype).

R1 feat/worker-perf-prototype (659bb831, 30ac3f32):

  • record-info pin;
  • dedicated event-drain thread with a synchronous flush;
  • gateway UnfairSemaphoreSpinLimit=10;
  • pin outcome in WorkerReady.record_info_pin_status (field 5, additive), logged by the gateway and shown on the dashboard session page.

windev: worker 67% → 6.2% of a core, gateway 8.1% → 6.9%.

R2 feat/gateway-relay-hops: #235 (inline hand-off, lazy dashboard mirror, read-ahead reader). windev: gateway −17.5% on top of R1.

Baseline (vd03, 2026-11-21): hot worker 44.5% of one core (15.7 user + 28.8 kernel), ≈11% of the box, at ~240 ev/s.

Merge

  • Review and merge R1 to main
  • Review and merge R2 to main (after the R1 vd03 soak)

Ring 0: windev

  • R1 deployed; gateway logs pinned {77e896ec-…} v3.2 for each session
  • perfload 30 min at ~242 ev/s: no faults, no backlog overflow, no sequence gaps; worker ≈6% of a core
  • Client e2e matrix once

Ring 1: DEV vd03 (owner deploy approval)

  • R1 deployed (one SHA for Server and Worker), runbook §7 incl. the 7.3 session read; pin status pinned on both sessions
  • CPU re-measure: owner-approved one-off typeperf (same as baseline, no WPR) or an on-box Task Manager reading. Pass: hot worker ≤10% of a core at a comparable rate
  • If still high with csagent cost: raise the CrowdStrike exclusion request for MxGateway.Worker.exe
  • 48 h soak; OtOpcUa and ScadaBridge consumers healthy
  • R2 deployed and re-measured (gateway CPU against R1)

Ring 2: QA vq03 → vq04

  • R1 (then R2 after its vd03 soak), runbook §7 on each box

Ring 3: PROD vp03 / vp04 (change window, downstream owners notified)

  • R1 + R2 after a 1-week QA soak; PAR boxes stay held as before

Close-out

  • Deploy notes under docs/deploy/ with the vd03 before/after numbers

Note: WinRM on the wonder boxes is deploy-only; the post-deploy counter capture needs explicit approval.

Deploy gate for the ~240 ev/s worker CPU fix. Plan: `docs/plans/2026-11-21-worker-perf-rollout.md` (on `feat/worker-perf-prototype`). **R1** `feat/worker-perf-prototype` (`659bb831`, `30ac3f32`): - record-info pin; - dedicated event-drain thread with a synchronous flush; - gateway `UnfairSemaphoreSpinLimit=10`; - pin outcome in `WorkerReady.record_info_pin_status` (field 5, additive), logged by the gateway and shown on the dashboard session page. windev: worker 67% → 6.2% of a core, gateway 8.1% → 6.9%. **R2** `feat/gateway-relay-hops`: #235 (inline hand-off, lazy dashboard mirror, read-ahead reader). windev: gateway −17.5% on top of R1. Baseline (vd03, 2026-11-21): hot worker 44.5% of one core (15.7 user + 28.8 kernel), ≈11% of the box, at ~240 ev/s. ### Merge - [ ] Review and merge R1 to `main` - [ ] Review and merge R2 to `main` (after the R1 vd03 soak) ### Ring 0: windev - [ ] R1 deployed; gateway logs `pinned {77e896ec-…} v3.2` for each session - [ ] `perfload` 30 min at ~242 ev/s: no faults, no backlog overflow, no sequence gaps; worker ≈6% of a core - [ ] Client e2e matrix once ### Ring 1: DEV vd03 (owner deploy approval) - [ ] R1 deployed (one SHA for Server and Worker), runbook §7 incl. the 7.3 session read; pin status `pinned` on both sessions - [ ] CPU re-measure: owner-approved one-off `typeperf` (same as baseline, no WPR) or an on-box Task Manager reading. **Pass:** hot worker ≤10% of a core at a comparable rate - [ ] If still high with `csagent` cost: raise the CrowdStrike exclusion request for `MxGateway.Worker.exe` - [ ] 48 h soak; OtOpcUa and ScadaBridge consumers healthy - [ ] R2 deployed and re-measured (gateway CPU against R1) ### Ring 2: QA vq03 → vq04 - [ ] R1 (then R2 after its vd03 soak), runbook §7 on each box ### Ring 3: PROD vp03 / vp04 (change window, downstream owners notified) - [ ] R1 + R2 after a 1-week QA soak; PAR boxes stay held as before ### Close-out - [ ] Deploy notes under `docs/deploy/` with the vd03 before/after numbers Note: WinRM on the wonder boxes is deploy-only; the post-deploy counter capture needs explicit approval.
dohertj2 added the area:workerpriority:p1type:deploy-gate labels 2026-11-21 08:01:07 -05:00
dohertj2 changed title from Deploy worker perf fixes to vd03 and re-measure 240 ev/s CPU to Roll out event-path CPU fixes (R1 worker pin/drain thread, R2 gateway relay) vd03 → QA → PROD 2026-11-21 08:40:14 -05:00
Author
Owner

Ring 1 (DEV vd03): R1 then R2 deployed 2026-11-21, no rollback. vd03 now runs 9a4bc1df. Deploy note: docs/deploy/2026-11-21-vd03-perf-r1-r2.md (branch feat/gateway-relay-hops).

Baseline e74918cc R1 R2
Event rate (ev/s) 355.1 241.4 242.3
Hot worker CPU (% of one core) 45.0 0.3 0.6
Hot worker CPU per event 1.268 ms 0.013 ms 0.023 ms
Server CPU (% of one core) 11.3 1.2 1.4
System context switches/s 131.6k 44.1k 56.1k
  • Pin: both workers report pinned after each deploy.
  • Env and settings: the env block (9 entries) is unchanged; the NAM appsettings and dashboard.pfx were carried. Downtime was about 13 s per deploy, and ScadaBridge re-subscribed its 810 tags.
  • R2 effect: none measurable on top of R1, because the Server is already at about 1% of a core.

Blocks QA: the event rate dropped from 355 to 242/s at the R1 restart and has not recovered.

  • AdviseSupervisory is still 810.
  • The windev bench rate was identical across the old and new builds.
  • After each reconnect ScadaBridge logged "Seed read returned no value for 298 tag(s)". 298 of 810 is about 37%, so those tags may have stopped delivering since the re-subscribe. Unconfirmed.
  • Not done: the runbook 7.3 Worker-path read with a pre-existing key.

Checklist: Ring 1 R1 deployed ✅, CPU re-measure ✅ (pass), R2 deployed and re-measured ✅. Open: explain the event-rate drop; 48 h soak.

**Ring 1 (DEV vd03): R1 then R2 deployed 2026-11-21, no rollback.** vd03 now runs `9a4bc1df`. Deploy note: `docs/deploy/2026-11-21-vd03-perf-r1-r2.md` (branch `feat/gateway-relay-hops`). | | Baseline `e74918cc` | R1 | R2 | |---|---|---|---| | Event rate (ev/s) | 355.1 | 241.4 | 242.3 | | Hot worker CPU (% of one core) | **45.0** | **0.3** | 0.6 | | Hot worker CPU per event | 1.268 ms | 0.013 ms | 0.023 ms | | Server CPU (% of one core) | **11.3** | **1.2** | 1.4 | | System context switches/s | 131.6k | 44.1k | 56.1k | - **Pin:** both workers report `pinned` after each deploy. - **Env and settings:** the env block (9 entries) is unchanged; the NAM appsettings and `dashboard.pfx` were carried. Downtime was about 13 s per deploy, and ScadaBridge re-subscribed its 810 tags. - **R2 effect:** none measurable on top of R1, because the Server is already at about 1% of a core. **Blocks QA: the event rate dropped from 355 to 242/s at the R1 restart and has not recovered.** - `AdviseSupervisory` is still 810. - The windev bench rate was identical across the old and new builds. - After each reconnect ScadaBridge logged "Seed read returned no value for 298 tag(s)". 298 of 810 is about 37%, so those tags may have stopped delivering since the re-subscribe. Unconfirmed. - Not done: the runbook 7.3 Worker-path read with a pre-existing key. Checklist: Ring 1 R1 deployed ✅, CPU re-measure ✅ (pass), R2 deployed and re-measured ✅. Open: explain the event-rate drop; 48 h soak.
Author
Owner

The 2026-12-02 bug + perf review (MXA-002 / WIP-002) confirmed that none of the event-path CPU fixes are on main at 54367e74. They live only on feat/worker-perf-prototype → feat/gateway-relay-hops → fix/readbulk-subscription-teardown, each 2 commits behind main. Landing them is Phase 1 of the fix plan: #252.

The 2026-12-02 bug + perf review (MXA-002 / WIP-002) confirmed that none of the event-path CPU fixes are on `main` at `54367e74`. They live only on `feat/worker-perf-prototype` → `feat/gateway-relay-hops` → `fix/readbulk-subscription-teardown`, each 2 commits behind main. Landing them is Phase 1 of the fix plan: #252.
Author
Owner

Merged to main at 68043411 (pushed 2026-12-03). Gateway suite 1610 passed / 0 failed (macOS); windev worker CI 836 passed / 0 failed on that SHA.

The R1/R2 code is now on main (Phase 1, #252), with perf.md as docs/WorkerEventPathPerformance.md. Left open for the QA/PROD rollout, which hasn't been requested yet.

Merged to `main` at `68043411` (pushed 2026-12-03). Gateway suite 1610 passed / 0 failed (macOS); windev worker CI 836 passed / 0 failed on that SHA. The R1/R2 code is now on `main` (Phase 1, #252), with `perf.md` as `docs/WorkerEventPathPerformance.md`. Left open for the QA/PROD rollout, which hasn't been requested yet.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/mxaccessgw#236