Skip to content

feat: enable support for memory ballooning feature provided by dockurr/windows image#776

Open
lukakama wants to merge 1 commit into
TibixDev:mainfrom
lukakama:feat/memory-ballooning
Open

feat: enable support for memory ballooning feature provided by dockurr/windows image#776
lukakama wants to merge 1 commit into
TibixDev:mainfrom
lukakama:feat/memory-ballooning

Conversation

@lukakama
Copy link
Copy Markdown

@lukakama lukakama commented May 10, 2026

Summary

Adds support for dynamic memory ballooning in Windows VMs, allowing the host system to reclaim unused memory when host is under memory pressure. This feature integrates with the new dockurr/windows image's built-in ballooning feature released on 5.15 (https://github.com/dockur/windows/releases/tag/v5.15).

Fix: #522

Main changes:

  • New experimental feature configuration to enable or disable dynamic memory (ballooning)
  • Setup of the Windows ballooning service for already installed Windows containers; newly installed Windows containers get the service installed from dockurr/windows unattended installation
  • Report of current effective VM available and used memory with balloon-corrected used memory
  • Use of QEMU QMP commands correlation ID, due to possible concurrent commands execution, with timeout support

Changes

Guest Server

  • Added /balloon/status endpoint to check balloon service status
  • Added /balloon/install endpoint to install the balloon service

QMP Manager

  • Added query-balloon command support
  • Refactored QMP connection handling with EventEmitter pattern
  • Implemented proper message buffering and command correlation with IDs
  • Added configurable timeouts for commands
  • Improved error handling and connection lifecycle management

Winboat Core

  • Integrated balloon status checking via QMP query-balloon command
  • Auto-installs missing balloon service when experimental features are enabled
  • Used dedicated memory stats object to reflect available, used and percentages memory stats accounting for ballooning

UI Updates

  • Config View

    • Added "Dynamic memory" toggle (visible when experimental features enabled)
    • Persists BALLOONING=Y environment variable in docker-compose when "Dynamic memory" is enabled
    • Disables ballooning when experimental features are turned off
  • Home View

    • Updated RAM display to show ballooned vs total memory
    • Shows adjusted RAM percentage based on actual available memory
    • Conditionally displays balloon info when memory is reclaimed

Feedback and suggestions for improvement are welcome, particularly for ballooned memory stats reporting.

Adds experimental support for memory ballooning feature provided by
dockurr/windows image, with support for stats and upgrade of existing
containers created with previous dockurr/windows versions.
@lukakama
Copy link
Copy Markdown
Author

The ballooning feature has just been released on dockur/windows v5.15 (https://github.com/dockur/windows/releases/tag/v5.15).

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.

[Feature] Dynamically resize RAM

1 participant