Skip to content

Update the doc - pressure algorithm. - #94

Merged
liang1wang merged 1 commit into
mainfrom
bug3
Aug 18, 2026
Merged

Update the doc - pressure algorithm.#94
liang1wang merged 1 commit into
mainfrom
bug3

Conversation

@liang1wang

Copy link
Copy Markdown
Contributor

No description provided.

@liang1wang
liang1wang requested review from xiaojingrich and a lite review from Copilot August 18, 2026 07:21
@liang1wang
liang1wang merged commit dac1274 into main Aug 18, 2026
1 check passed
@liang1wang
liang1wang deleted the bug3 branch August 18, 2026 07:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, disk max_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 thread monitor/pressure.py
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.
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.

2 participants