Open DaLiV opened 1 month ago
4 - i showed how that was done
virsh setmem VMName --live --size 32G
that allocate from partial usage "4Gb" dynamic to full 32G what is defined for this VM. standart defined command, standart "not-recomended" behaviour.
That test firstly is done for more cleraly understand where is possible fault persist.
all of ways 1/2/3/4 shows the same direction - dynamic memory + it's ballooning ...
long shutdown time is first symptom.
timing from (4) lead to think that half of this time is used for same "full memory allocation" with parallel "dealloction" at shutdown,
yes - that can prevent from OOMs, but at cost of "time" , which by many VMs will be multiplied ...
simple example for upgrade of host: so - you have running 10 such VMs with dynamic allocation and need shutdown all of them
P.S. swap usage=0, nothing goes there in case of some will say "you swapping at this time" what is not "recommended" P.P.S even if "slow dymanic memory allocation" can be improved from "90 sec" to some "5sec" that will be also usable (then "shutdown-crutch-script" may be used as permanent "solution", as that has "VM-Importance-order") P.P.P.S in case of dynamic underprovisioning to "2Gb" cpu usage also constantly "high" - that is additional point in this subsystem (but possible also related to the same part of code) .
@DaLiV Win11 guest indeed has this problem with balloon device, it took almost twice as long as WS2022 guest. There is already a jira issue recorded internally. If there is any update, we'll update here.
Describe the bug at/after shutdown of guest os when use less than :
problem occurs not (shutdown of VM takes some seconds) in cases when: 1
<currentMemory>
equal to<memory>
2 memballoon driver disabled in windows 3 memballoon disabled on libvirt with "model=none"virsh setmem VMName --live --size 32G
sure - that op also takes time - approx 90sec. but direct shutdown "without that" takes 180sec. that means 2 times less, shutdown done afterwards in "below 5 seconds"seems memballoon allocate memory at shutdown when deallocation processes running,
To Reproduce
Expected behavior Shutdown must not take long time.
Host: