Skip to content

waze-on-cluster: patch and recovery services in the standard slice, journal keeper in the background slice - #285

Merged
robertnisipeanu merged 1 commit into
mainfrom
rf-slice-idrive
Nov 24, 2026
Merged

robertnisipeanu merged 1 commit into
mainfrom
rf-slice-idrive

Conversation

@robertnisipeanu

@robertnisipeanu robertnisipeanu commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

The head unit schedules its services in CPU slices: the HMI and its compositor in the interaction slice, most services in the standard slice with the same weight, background work far lower. A unit without Slice= lands in the system slice, which carries about three times the interaction slice's weight, so under load it takes CPU time ahead of the HMI.

This moves three waze-on-cluster services out of the system slice:

  • waze-on-cluster-patchd.service and waze-on-cluster-recovery.service → standard.slice, beside carplay and aapd, the services they patch, watch and start. Their remounts and helper runs have wall-clock bounds, so they stay level with the services they act on rather than in the background slice.
  • waze-on-cluster-journal.service → background.slice. It keeps its Nice=19, idle I/O class, CPUShares and CPUQuota.

Measured on a test unit with the CPU limited to roughly the head unit's speed: in the background slice the journal keeper stayed as close behind the journal during each start as in the system slice.

The map decoder (waze-on-cluster.service), cluster-render.service and the two boot checks keep their slice. Moving the map services to the standard slice cost map frames under heavy load on the test unit, and the boot checks gate carplay's and aapd's start.

Update order: the unit files ship with this component and the deploy tool installs them as they are. There is no new requirement. Both slices exist on iDrive 7 and iDrive 8, and systemd creates an empty slice where one is missing, so the unit still starts. Each service moves at its next start: the update restart, or the next head-unit start.

AI: Claude Code, Claude Opus 5.5

Tested: make test-node in native/waze-on-cluster passes, including patch/test/units_test.js. On an iDrive 7 test unit with car-like CPU limits, repeated starts with the journal keeper in either slice: its lag behind the journal at each start and the cgroup it lands in. patchd and boot recovery were not run on the test unit; their timeouts were checked in the source (recovery.js, patchd.js). Not tested on a car.

Human review: no

Screenshots: n/a

🤖 Generated with Claude Code

…ournal keeper in the background slice

Units without a Slice= run in the system slice, which carries about three
times the weight of the HMI's interaction slice. patchd and the boot
recovery move to the head unit's standard slice, where carplay and aapd
run; the journal keeper moves to its background slice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robertnisipeanu
robertnisipeanu merged commit e68987a into main Nov 24, 2026
9 checks passed
@robertnisipeanu
robertnisipeanu deleted the rf-slice-idrive branch November 24, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant