Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Ballooning Question (version support) #1093

Open
madmax01 opened this issue May 3, 2024 · 13 comments
Open

Windows Ballooning Question (version support) #1093

madmax01 opened this issue May 3, 2024 · 13 comments
Labels

Comments

@madmax01
Copy link

madmax01 commented May 3, 2024

this is more an question.

we spotted that any non-linux vm does a full allocation of ram an not freeing up......equal what libvirt.. 8.0/8.6/9.0 or 6.0/7.2 qemu.

now question is - which virtio driver package supports the Ballooning on windows? as something is not right seems

@madmax01
Copy link
Author

madmax01 commented May 3, 2024

i looked and we have 0.1.240 in use

@madmax01
Copy link
Author

madmax01 commented May 3, 2024

1.5/8GB but assigned is 8GB and boots up with 8GB........... not reclaming to kvm

@madmax01
Copy link
Author

madmax01 commented May 3, 2024

virsh qemu-monitor-command --hmp Win10 'balloon 1500' with this ballooning works.......but not auto-balloon

is that auto-ballooning planned for virtio?

@madmax01
Copy link
Author

madmax01 commented May 3, 2024

seems that command was just a lucky strike.... triied again and on others > not reclaiming.... the balloon info shows already at max size......is the balloon service not correct installed on windows ?

@ybendito
Copy link
Collaborator

ybendito commented May 3, 2024

@madmax01 This should work assuming you have balloon driver installed on the guest. With build 240 and later and earlier. Look in device manager under "system devices" -> "virtio balloon driver". The system will start with 8G and as soon as the driver is up it starts giving the memory to qemu.

@madmax01
Copy link
Author

madmax01 commented May 4, 2024

i defo installed the whole exe package and didn't unchecked anything.. will check device manager... so far i know i have different versions of virtio on windows...but non of them reclaming to qemu...... 7.2 or 6.0 qemu.......

may you know which libvirt/qemu confirmed should work minimum? freebsd also have same issue......but linux seems don't have that issue > reclaims unused mem

@madmax01
Copy link
Author

madmax01 commented May 4, 2024

image
image

dominfo:
Max memory: 8388608 KiB
Used memory: 8388608 KiB

domstat
balloon.current=8388608
balloon.maximum=8388608
balloon.last-update=1714816720
balloon.rss=2525324

dommemstat

actual 8388608
last_update 1714816720
rss 2526092

i checked on other stack (above seems working....odd) something with libvirt/qemu which i didn't spotted before

7.2 qemu + 9.0 libvirt = windows not reclaming unused mem (ppa on ubuntu)
6.2 qemu + 8.0 libvirt = windows reclaming unused mem (default)

we upgraded libvirt > because of strange bugs of default ones

may from virtio point this is known case? you think its an libvirt or qemu case

@madmax01
Copy link
Author

madmax01 commented May 4, 2024

may there are known ppa's for 9.6 libvirt and qemu 8.0? not finding it atm ;(

@ybendito
Copy link
Collaborator

ybendito commented May 4, 2024

Just did a smoke test with Fedora 36, libvirt-8.1.0-2.fc36, qemu qemu-6.2.0-17.fc36, 8GB/7GB, driver 228, works, hmp 'info balloon' returns 7G after boot

@madmax01
Copy link
Author

madmax01 commented May 5, 2024

well when i check info balloon then it shows same amoutn which is assigned.. but when checking rss > its still assigned mem and not freed ha.....very strange.......but on linux its like no issue........just spotted windows + freebsd (well seems not an virtio issue) ;( something between ubuntu 22.04 libvirt/qemu....buest guess is 24.04 lts

@madmax01
Copy link
Author

madmax01 commented May 6, 2024

bit fun - as seems linux acting not like that

when checking linux dom.. its matching up Maxmem to balloon info.......looking on windows its same... but rss is same assigned size not reclaiming........

in that case when i reduce balloning instead of full to say 2048.....then windows starts to reclaim.......very confusing

@madmax01
Copy link
Author

madmax01 commented May 6, 2024

Max memory: 20971520 KiB
Used memory: 20971520 KiB

on linux +windows

balloon info tells balloon: actual=20480

linux reclaims > windows not

when i do --hmp xxx "balloon 1" on windows vm then it starts working and Used memory goes down

i'am not very sure where this issue is....

@madmax01
Copy link
Author

madmax01 commented May 8, 2024

virsh setmem --size 2560 --live xxx

that triggers the ballooning and hmp goes down....then i can see the real % usage but mem side mem usage goes up because of comitted ram.....

that behavior is strange.......on linux its auto working

i tested this now on new ubuntu 24.04 lts too > exact same behavior (windows vm with virtio)

virsh qemu-monitor-command --hmp test "info balloon"
balloon: actual=8192

virsh dommemstat test
actual 8388608
last_update 1715191125
rss 8448364

virsh dominfo maxtest01
Id: 10
Name: test
UUID: cd23c4ef-b1da-4a1f-b2fc-d203709f8f1f
OS Type: hvm
State: running
CPU(s): 4
CPU time: 38.0s
Max memory: 8388608 KiB
Used memory: 8388608 KiB
Persistent: yes
Autostart: disable
Managed save: no
Security model: none
Security DOI: 0

now i need to do either
virsh setmem --size 8192 --live test
or
virsh qemu-monitor-command --hmp test "balloon 1"

balloon service running virt-io installed (0.1.240)

then windows have more mem usage but host side seems reclaim (when triggering)

i don't understand this behavior.

i see an general problem with windows on kvm (which seems not appear on vmware)

  • with default ballooning and kvm > vm boots nice - low mem usage - but host tells 100% allocated and 100% in use.. where on guest side just 1GB in use
  • when doing the balloon trigger above > most mem goes to guest and the mem usage increase as most is committed gb then. usage on host side tells real guest usage

i'am blank on that one.. nobody have that issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants