-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Allow KVM overcommit to work without reducing minimum VM memory when vm ballooning is disabled #7810
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
Conversation
)" This reverts commit d127d79.
This makes the KVM guru pass the max memory to KVM agent by picking the max. memory from the VM transfer object. This lets the cluster/agent decide if VM should start with the min or max memory depending on whether vm.memballoon.disable is false (default) or true. When `vm.memballoon.disable` is true, VMs start with max. memory. Right now the max memory isn't sent to the KVM agent causing the regression. Also fixes apache#7430 Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
|
I think here's how we deal with three issues:
please review and advise - @DaanHoogland @weizhouapache @harikrishna-patnala @blueorangutan package |
|
@rohityadavcloud a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tnx @rohityadavcloud , I'll test against all issues related
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
Outdated
Show resolved
Hide resolved
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
Outdated
Show resolved
Hide resolved
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
Outdated
Show resolved
Hide resolved
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
Outdated
Show resolved
Hide resolved
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
Outdated
Show resolved
Hide resolved
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
Outdated
Show resolved
Hide resolved
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
Outdated
Show resolved
Hide resolved
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
Outdated
Show resolved
Hide resolved
|
I would suggest not to change the default value. @rohityadavcloud |
…/resource/LibvirtVMDefTest.java Co-authored-by: dahn <daan.hoogland@gmail.com>
…/resource/LibvirtVMDefTest.java Co-authored-by: dahn <daan.hoogland@gmail.com>
…/resource/LibvirtVMDefTest.java Co-authored-by: dahn <daan.hoogland@gmail.com>
…/resource/LibvirtVMDefTest.java Co-authored-by: dahn <daan.hoogland@gmail.com>
…/resource/LibvirtVMDefTest.java Co-authored-by: dahn <daan.hoogland@gmail.com>
…/resource/LibvirtVMDefTest.java Co-authored-by: dahn <daan.hoogland@gmail.com>
…/resource/LibvirtVMDefTest.java Co-authored-by: dahn <daan.hoogland@gmail.com>
…/resource/LibvirtVMDefTest.java Co-authored-by: dahn <daan.hoogland@gmail.com>
|
@weizhouapache in that case let me grab Daan's workaround to not apply min memory for systemvms |
This reverts commit a5cac4c.
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6648 |
|
|
||
| grd.setMemorySize(maxRam); | ||
| grd.setCurrentMem(currRam); | ||
| grd.setCurrentMem(getCurrentMemAccordingToMemBallooning(vmTO, maxRam)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realised the maxRam seetting is fixed as in the KVMGuru the correct maxRam is passed now.
cc @DaanHoogland @weizhouapache let's test
|
Okay @weizhouapache @DaanHoogland I've address code comments and revert the change of balloon behaviour; if memory ballooning feature works then I think it might just work as earlier we weren't passing the right max ram value; @blueorangutan package |
|
@blueorangutan test matrix keepEnv |
|
@DaanHoogland a [SF] Trillian-Jenkins matrix job (centos7 mgmt + xenserver71, rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
Codecov Report
@@ Coverage Diff @@
## 4.18 #7810 +/- ##
============================================
- Coverage 13.02% 13.02% -0.01%
+ Complexity 9031 9029 -2
============================================
Files 2720 2720
Lines 257010 257010
Branches 40083 40081 -2
============================================
- Hits 33472 33471 -1
- Misses 219336 219338 +2
+ Partials 4202 4201 -1
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
harikrishna-patnala
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
...ypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
Outdated
Show resolved
Hide resolved
|
Thanks @DaanHoogland if you see my comment, we need not re-open the previous issue. Ask @weizhouapache to review and lgtm/advise; This PR handles the following cases:
I think this covers most of the cases and doc PR handles advising users the best practice they deem fit for what they're doing. |
...ypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
Show resolved
Hide resolved
|
@blueorangutan package |
|
@DaanHoogland a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6666 |
|
[SF] Trillian test result (tid-7258)
|
|
@blueorangutan test |
|
@rohityadavcloud a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-7257)
|
|
[SF] Trillian test result (tid-7259)
|
|
[SF] Trillian test result (tid-7269)
|
|
[SF] Trillian test result (tid-7285)
|
|
@rohityadavcloud, #7430 is fixed in this PR. When memory overprovisioning is set to 3 on the cluster: when set to 5 with overprovisioning set to 1 Looks good |
|
@blueorangutan test matrix |
|
@DaanHoogland a [SF] Trillian-Jenkins matrix job (centos7 mgmt + xenserver71, rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
|
Thanks for testing @DaanHoogland I suppose that's true if the vm divide setting is enabled for user-vms; for systemvms the memory would be consistently the same (max memory). |
|
[SF] Trillian test result (tid-7287)
|
|
[SF] Trillian test result (tid-7288)
|
|
[SF] Trillian test result (tid-7289)
|
Yes @rohityadavcloud , I can test that as well, but we already showed that SVMs start which is what is what matters. Errors in the kvm version seem unrelated, merging. |
* 4.18: Allow KVM overcommit to work without reducing minimum VM memory when vm ballooning is disabled (#7810)
|
Cheers thanks @DaanHoogland |
This makes the KVM guru pass the max memory to KVM agent by picking the max. memory from the VM transfer object. This lets the cluster/agent decide if VM should start with the min or max memory depending on whether vm.memballoon.disable is false (default) or true.
When vm.memballoon.disable is true, VMs start with max. memory. Right now the max memory isn't sent to the KVM agent causing the regression. This feature is defined at https://github.com/apache/cloudstack/blob/main/agent/conf/agent.properties#L220
Fixes: #7794
Also
Fixes #7430 if user sets
vm.memballoon.disableto true in agent.properties.Doc PR to clarify this further at apache/cloudstack-documentation#337
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?