Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…, so --idle-timeout can fire (#1093)
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.
Fixes #1093. Both idle thresholds were 100 KB per one-minute tick. Real untouched instances on every supported Linux AMI exceed that on their own, so idle-stop never fired (measured live: four instances, 20+ minutes each, every tick "Not idle").
Disk is almost all systemd-journald (per-process /proc//io over 5 minutes: journald 11 MB, everything else < 0.4 MB).
idleNetworkBytesThreshold= 1 MiB/min (~5× the highest idle reading),idleDiskBytesThreshold= 16 MiB/min (~2× the highest idle spike, 4–16× typical). A minute over a threshold only restarts the idle window, so the margin is over the steady background, not every spike.TestMeasuredIdleMinutesReadIdledrives the realidleDecisionwith the measured minutes;TestWorkloadMinutesReadActivewith job-scale I/O. Watched failing against compiling reverts both ways (old 100 KB thresholds; thresholds at 1 TiB). Removed four tests that compared values against their own local copy of "100000" and so could never fail: they are why the wrong threshold went unnoticed. The Prometheus scrape calls IsIdle()/getCPUUsage() and shares sample state with the monitor loop: data race, and a scrape shrinks the idle window (false idle-stop possible) #952 scrape test now scales with the threshold.