Skip to content

Conversation

@elizashurov
Copy link

@elizashurov elizashurov commented Nov 4, 2025

Increase guest_compare_threshold and guest_mem_ratio to reduce false failures caused by small differences between QEMU monitor and Windows guest reported memory after ballooning operations.

ID:4607

Summary by CodeRabbit

  • Chores
    • Updated Windows guest memory management configuration parameters to enhance balloon service performance during testing scenarios.

Increase guest_compare_threshold and guest_mem_ratio to reduce
false failures caused by small differences between QEMU monitor
and Windows guest reported memory after ballooning operations.

ID:4607

Signed-off-by: Elizabeth Ashurov <[email protected]>
@coderabbitai
Copy link

coderabbitai bot commented Nov 4, 2025

Walkthrough

The pull request updates two configuration parameters in the QEMU balloon service test file. The guest_compare_threshold value is increased from 300 to 700, and the guest_mem_ratio value is increased from 0.025 to 0.08. These are numerical adjustments to test configuration settings with no structural or logic changes to the configuration file.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single file modified with only parameter value adjustments
  • No logic, structural, or functional changes
  • Configuration tuning only requires verification that new values are appropriate for test behavior

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: increasing memory comparison thresholds for Windows balloon service testing to reduce false failures.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a0379c1 and 6c17b3b.

📒 Files selected for processing (1)
  • qemu/tests/cfg/balloon_service.cfg (1 hunks)
🔇 Additional comments (1)
qemu/tests/cfg/balloon_service.cfg (1)

13-14: Thresholds serve different purposes; confirm the new values won't mask legitimate failures.

The parameter changes are correctly isolated to balloon_service.cfg and serve distinct purposes:

  • guest_compare_threshold and guest_mem_ratio (lines 13-14): Used in memory ballooning operation variance checks
  • check_mem_diff (line 26): Used in separate QMP statistics validation—correctly unchanged

The balloon_service test uniquely performs service start/stop/restart operations alongside memory ballooning, which likely introduces additional Windows driver variance justifying higher tolerance thresholds.

However, the specific increases are substantial (700 MB threshold +133%, 8% ratio +220%), and there's no documented evidence (comments, test results, or configuration rationale) explaining why these particular values were chosen or validated through testing.

Recommendation: Verify that:

  1. These thresholds were empirically tested to ensure they don't mask legitimate memory reporting failures
  2. The values are specific to balloon_service operations (not needed for other balloon tests)
  3. Thresholds remain appropriately constrained while addressing the false failure issue

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant