feat(ansible): add vm dirty/writeback tuning params to tuned profile#2249
Draft
hunleyd wants to merge 1 commit into
Draft
feat(ansible): add vm dirty/writeback tuning params to tuned profile#2249hunleyd wants to merge 1 commit into
hunleyd wants to merge 1 commit into
Conversation
Add vm.dirty_background_ratio, vm.dirty_expire_centisecs, vm.dirty_ratio, and vm.dirty_writeback_centisecs to the sysctl section of the PostgreSQL tuned profile.
|
Found 75 test failures on Blacksmith runners: Failures
|
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.
What kind of change does this PR introduce?
Feature — additional kernel sysctl tuning for the PostgreSQL
tunedprofile.What is the current behavior?
The
tunedprofile (ansible/tasks/setup-tuned.yml) sets a range offs.*,kernel.*,net.*, and a singlevm.panic_on_oomsysctl parameter, but does not tune the kernel's dirty-page writeback behavior. Defaults leave large amounts of dirty page cache to accumulate before flushing.What is the new behavior?
Adds four
vm.dirty_*sysctl parameters to thesysctlsection of the tuned profile, inserted in alphabetical order:vm.dirty_background_ratio10vm.dirty_expire_centisecs3000vm.dirty_ratio40vm.dirty_writeback_centisecs500These give PostgreSQL more predictable, smoother I/O: background flushing kicks in at 10% of memory and writeback runs every 5s, so dirty pages are written out steadily rather than in large bursts. This reduces the chance of long write stalls and latency spikes during checkpoints and heavy write workloads, while the 40% hard
dirty_ratiostill bounds total dirty memory.Additional context
vm.panic_on_oomwas already present in the loop and is left unchanged.vm.swappinessis intentionally left in the existing zswap conditional block (only applied when swap is present) rather than moved into the unconditional sysctl loop.yamllintandansible-lintboth pass with no rule violations.