mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-22 18:52:28 +01:00
Fix stale swappiness advice for zram
Some checks are pending
md-naming / markdown naming convention (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (mypy, mypy) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (pylint, pylint) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (rest, ) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (shellcheck, shellcheck) (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
Shell tests / shell-tests (push) Waiting to run
Shell tests / lib-tests (push) Waiting to run
Shell tests / arch-tests (push) Waiting to run
Some checks are pending
md-naming / markdown naming convention (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (mypy, mypy) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (pylint, pylint) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (rest, ) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (shellcheck, shellcheck) (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
Shell tests / shell-tests (push) Waiting to run
Shell tests / lib-tests (push) Waiting to run
Shell tests / arch-tests (push) Waiting to run
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WzxdWUvCN36e1dx3Ejii1p
This commit is contained in:
parent
88d8b4454c
commit
f83d700d2a
20
docs/superpowers/evidence/swappiness-advice-2026-11-22.json
Normal file
20
docs/superpowers/evidence/swappiness-advice-2026-11-22.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"intent": "Stop arch_perf_probes.sh advising vm.swappiness=10 now that the host runs 32 GiB zram at swappiness 100.",
|
||||
"scope": [
|
||||
"linux_configuration/fixes/lib/arch_perf_probes.sh check_memory_pressure action text",
|
||||
"linux_configuration/fixes/lib/tests/test_arch_perf_probes_health.sh",
|
||||
"non-goal: ubuntu_perf_fixes.sh / fix_ubuntu_performance.sh (Ubuntu, no zram setup)"
|
||||
],
|
||||
"changes": [
|
||||
"High-swap action now points at zramctl and the top memory users instead of lowering swappiness"
|
||||
],
|
||||
"verification": [
|
||||
{
|
||||
"command": "bash fixes/lib/tests/test_arch_perf_probes_health.sh",
|
||||
"result": "pass",
|
||||
"evidence": "RED 26 passed 3 failed; GREEN 29 passed 0 failed"
|
||||
}
|
||||
],
|
||||
"risks": ["Advice text only; no runtime behaviour change"],
|
||||
"rollback": ["git revert the commit"]
|
||||
}
|
||||
@ -158,7 +158,7 @@ check_memory_pressure() {
|
||||
echo "Swap usage: ${swap_pct}%" >>"$REPORT_FILE"
|
||||
if [[ $swap_pct -ge 35 && ${mem_available:-0} -gt $((mem_total / 3)) ]]; then
|
||||
add_finding "High swap usage while RAM is still available; this can cause stutter."
|
||||
add_action "Consider lowering swappiness (temporary: sudo sysctl vm.swappiness=10)."
|
||||
add_action "Swap is zram by design; check zramctl usage and the top memory users (ps aux --sort=-rss | head), then stop idle services."
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@ -148,8 +148,12 @@ _t_contains "$(_t_report)" "Swap usage: 75%" \
|
||||
"check_memory_pressure: computes the swap usage percentage"
|
||||
_t_contains "$(_t_findings)" "High swap usage while RAM is still available" \
|
||||
"check_memory_pressure: flags heavy swapping while RAM is free"
|
||||
_t_contains "$(_t_actions)" "lowering swappiness" \
|
||||
"check_memory_pressure: recommends lowering swappiness"
|
||||
_t_lacks "$(_t_actions)" "swappiness" \
|
||||
"check_memory_pressure: does not suggest tuning swappiness (zram setup runs at 100)"
|
||||
_t_contains "$(_t_actions)" "zramctl" \
|
||||
"check_memory_pressure: points at zramctl usage"
|
||||
_t_contains "$(_t_actions)" "ps aux --sort=-rss" \
|
||||
"check_memory_pressure: points at the top memory users"
|
||||
|
||||
# Heavy swap use with RAM genuinely exhausted is NOT the stutter signature,
|
||||
# so it must not be flagged.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user