Update the doc - pressure algorithm. - #94
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the pressure-algorithm documentation and its generated figures to match the shipped configuration defaults, and adjusts the default pressure-related tuning values in config/config.yaml.
Changes:
- Align docs and figure-generation script with shipped defaults (weights 1:7:2, mem gate
k=8, diskmax_p_weight=0.8) and clarify how level “bands” map to thresholds. - Regenerate embedded SVG figures to reflect the updated banding/parameters and add explanatory callouts.
- Update shipped configuration defaults for pressure scoring (weights, disk aggregation weight, memory gate steepness).
Reviewed changes
Copilot reviewed 4 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| monitor/pressure.py | Updates an explanatory comment to reflect the current default weight ratio. |
| docs/pressure_model_figures.py | Clarifies band semantics and ties figure constants to shipped config; regenerates plots with updated parameters. |
| docs/pressure_algorithm.md | Expands/clarifies the algorithm documentation (bands, rationale for parameters, worked examples) and aligns with shipped defaults. |
| docs/images/score_vs_memory.svg | Regenerated figure reflecting new weights/band rendering and updated annotations. |
| docs/images/mem_gate_steepness.svg | Regenerated figure with “config” callout for shipped k. |
| docs/images/disk_noisy_or.svg | Regenerated figure reflecting band rendering and added explanation about max_p_weight implications. |
| docs/images/disk_gate.svg | Regenerated figure reflecting band rendering and updated explanatory notes. |
| config/config.yaml | Changes shipped defaults (disk max_p_weight, system weights, mem_gate_steepness) and adds rationale comments. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
137
to
141
| # NORMALIZED weighted average, not a raw sum. A raw sum let CPU/IO each add their | ||
| # full PSI (weight 1) so cpu 100% alone reached ~0.7-0.9 -- "high" -- even with RAM | ||
| # ample, which contradicts the intent (weights 1:8:1) that memory dominates and CPU | ||
| # ample, which contradicts the intent (weights 1:7:2) that memory dominates and CPU | ||
| # saturation is benign. Dividing by Σweights keeps CPU/IO minor (their small share) | ||
| # and lets memory carry most of the average. |
Comment on lines
+25
to
+29
| # Band edges are the ENTRY thresholds from PressureAnalyzer.get_pressure_level | ||
| # (``score >= thresholds[X]`` -> level X), not the exits: with the default | ||
| # 0.4/0.6/0.8/1.0 a score of 0.5 is still `low`, and `critical` is the top edge only. | ||
| # Each band is drawn from its own entry threshold up to the next one, so plots that | ||
| # carry bands need yhi > 1.0 for the `critical` sliver to be visible. |
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.
No description provided.