docs: explain low-priority service policy - #408
Open
dpc wants to merge 1 commit into
Open
Conversation
### 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.
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. |
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.
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, andudevadm verify. The change is documentation-only; it does not alter service defaults or shipped code.