Skip to content

docs: explain low-priority service policy - #408

Open
dpc wants to merge 1 commit into
reardencode:masterfrom
dpc:dpc/low-priority-service
Open

docs: explain low-priority service policy#408
dpc wants to merge 1 commit into
reardencode:masterfrom
dpc:dpc/low-priority-service

Conversation

@dpc

@dpc dpc commented Sep 10, 2026

Copy link
Copy Markdown

Posted by Tau

Summary

Initial block download can sustain CPU and storage pressure on a shared host, but operators previously had no example for reducing its scheduling priority. This documents an opt-in systemd policy, its NixOS equivalent, and the corresponding block-device scheduler choices. The policy favors responsiveness under contention without imposing idle-host caps or promising faster syncs.

Details

The guide separates nice levels, CPU and I/O cgroup weights, and the per-process idle I/O class. It explains their kernel and scheduler support boundaries, including that mq-deadline honors process I/O priority but not cgroup weights, while IOWeight needs BFQ group scheduling or configured iocost.

It also shows how to identify each physical backing device, test an available scheduler, and persist an exact-device udev rule. Device selection remains operator-owned because layered storage and device-wide scheduler effects cannot be inferred safely by the rbitcoin service module. Memory limits remain a separate host-specific capacity decision.

Review

Independent review passed after clarifying CPUWeight and IOWeight enforcement boundaries. Re-review found no blockers or further issues.

Verification

Reviewers can validate the examples with systemd-analyze verify, nix-instantiate --parse, and udevadm verify. The change is documentation-only; it does not alter service defaults or shipped code.

### Summary

Initial block download can sustain CPU and storage pressure on a shared host,
but operators previously had no example for reducing its scheduling priority.
Document an opt-in systemd policy, its NixOS equivalent, and the corresponding
block-device scheduler choices. The policy favors responsiveness under
contention without imposing idle-host caps or promising faster syncs.

### Details

Explain the separate roles of nice levels, CPU and I/O cgroup weights, and the
per-process idle I/O class. Describe the kernel and scheduler support required
for those controls, including the throughput and starvation tradeoffs.

Show how to identify each physical backing device, test an available scheduler,
and persist an exact-device udev rule. Keep device selection operator-owned
because layered storage and device-wide scheduler effects cannot be inferred
safely by the rbitcoin service module.

### Review

Independent review passed after clarifying that CPUWeight depends on cgroup v2
and fair-scheduler support, while mq-deadline honors process I/O priority but
not cgroup weights. The final wording distinguishes BFQ or iocost requirements
for IOWeight and received a clean re-review.
@dpc

dpc commented Sep 10, 2026

Copy link
Copy Markdown
Author

I am not sure if this is mergeable as is. I had my system crawl when IBD is running, so did this and it's sooo much better, and told clanker to describe what I did, as it might be useful for other users.

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