Repository navigation
boot: what giving memory back costs - QEMU's CPU, the host's huge pages, and using it again - #83
Merged
Merged
Conversation
…es, and using it again page_reporting_order 0 leaves ~140 MB less of a guest's freed RAM on the host than the default 9 (run 36881456066). Before that becomes the machine's default, the reclaim probe says what it costs: QEMU's CPU at each step, how much of the guest's RAM the host still backs with huge pages, and a step that has the guest use 768 MB again. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
The reclaim probe gains the costs of handing memory back. The probe is lab tooling, so nothing in the machine changes.
QEMU CPU(cumulative ms from/proc/<pid>/stat) andRAM HUGE(how much of the guest's RAM mapping the host backs with transparent huge pages, fromAnonHugePagesin smaps).What it measured on construct (run 36931619739, 3 boots per variant, p50):
A lower order gives about 100 MB per VM back, and only in the window after the guest frees memory. In exchange, about 180 MB of the guest's RAM ends up on 4K pages and stays there, and using memory again is about 16 % slower. The machine keeps order 9; this PR only keeps the probe that can say so again.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.