Repository navigation
waze-on-cluster: patch and recovery services in the standard slice, journal keeper in the background slice - #285
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.serviceandwaze-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 itsNice=19, idle I/O class,CPUSharesandCPUQuota.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.serviceand 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-nodeinnative/waze-on-clusterpasses, includingpatch/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