Fix memory stats for KVM - #6358
Conversation
|
@blueorangutan package |
|
@joseflauzino a 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: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3358 |
…tead of virsh command to get Libvirt domains
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
Found UI changes, kicking a new UI QA build |
…memory-stats-for-kvm
|
I moved the code to a more appropriate location. Also, I adjusted the code to get the VM list (Libvirt domains) by using libvirt-java instead of a virsh command. |
|
Found UI changes, kicking a new UI QA build |
|
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
|
UI build: ✔️ |
DaanHoogland
left a comment
There was a problem hiding this comment.
@joseflauzino ,
please have a look at the code smells reported:
SonarCloud Quality Gate failed.
some of them make more sense than others, but none arereally senseless as far as I can see.
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@blueorangutan package |
|
@joseflauzino a 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. |
|
SonarCloud Quality Gate failed. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3525 |
|
ping @joseflauzino can you address the review comments? |
|
Trillian test result (tid-5184)
|
|
@joseflauzino |
…memory-stats-for-kvm
|
Found UI changes, kicking a new UI QA build |
|
@blueorangutan package |
|
@joseflauzino a 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: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. LL-JID 184 |
| * 1st parameter: the VM name;<br> | ||
| * 2nd parameter: the period (in seconds). | ||
| */ | ||
| private static final String COMMAND_SET_MEM_BALLOON_STATS_PERIOD = "virsh dommemstat %s --period %s --live"; |
…memory-stats-for-kvm
|
@blueorangutan package |
|
@joseflauzino a 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: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. LL-JID 212 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
DaanHoogland
left a comment
There was a problem hiding this comment.
looks good, two minor sonar issues. will re-run regression tests.
Most of the sonar issues are not your doing @joseflauzino . Could you have a quick look anyway?
|
Kudos, SonarCloud Quality Gate passed! |
|
Trillian test result (tid-46)
|









Description
Using KVM hypervisor, the free memory stats of the user VMs that are returned by ACS do not correspond to those observed directly in the VMs (when using the
free -mcommand, for example).It was identified that the problem was in the memory stats collection process performed by Libvirt. This happens because the period that Libvirt would get memory stats updates for each VM was never set. Thus, even if ACS periodically requested the stats for the hosts, the data obtained were always the same.
This PR solves the mentioned problem. A new Agent configuration parameter called
vm.memballoon.stats.periodwas created. This parameter allows operatos to set the time interval in which Libvirt will get memory stats updates. The default value of this parameter is 60 seconds, the same default value as thevm.stats.intervalparameter. However, in a cloud containing multiple Management Servers, operators can set the value ofvm.memballoon.stats.periodlower than thevm.stats.interval, so that each Management Server always gets updated memory stats for all user VMs (since each Management Server can request stats at different instants).Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
How Has This Been Tested?
In a local lab, I tested multiple combinations for all the related Agent properties (
vm.memballoon.stats.period,vm.stats.interval, andvm.memballoon.disable). In all cases tested, the memory stats of the user VMs were obtained properly.Also, I added unit tests.