Change in mom[master]: Adding support in CPU monitoring

alitke at redhat.com alitke at redhat.com
Tue May 20 13:22:45 UTC 2014


Adam Litke has submitted this change and it was merged.

Change subject: Adding support in CPU monitoring
......................................................................


Adding support in CPU monitoring

Adding two new collectors and a controller to enable
monitoring the CPU tuning parameters: vcpu_quota, vcpu_period.

This patch is part of the CPU SLA feature: http://www.ovirt.org/Features/CPU_SLA.

Changes in collectors:
Added a new utility method to Collector.py, "count_int",
count the number of matches in a string according to a regular expression.

Added HostCpu to expose the number of cpu on the host.

Added GuestCpuTune to expose the current tuning parameters and the latest user selection

Changes in controller:
Added CpuTune to apply changes to the vcpu tuning.

This patch is used in the cputune.policy, some code snip:
(defvar anchor 100000)
(def check_and_set_quota (guest)
{

    (defvar calcQuota (/ (* anchor (/ guest.user_vcpu_limit 100))) guest.vcpu_count)

    (if (!= guest.vcpu_quota calcQuota)
        (guest.Control "vcpu_quota" calcQuota) 0)
})

Change-Id: I31428499ae7b34cafa3eacf5ca0d7a39eabe23ec
Signed-off-by: Kobi Ianko <kianku at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/27240
Tested-by: Kobi Ianko <kobi at redhat.com>
Reviewed-by: Adam Litke <alitke at redhat.com>
---
M mom/Collectors/Collector.py
A mom/Collectors/GuestCpuTune.py
A mom/Collectors/HostCpu.py
A mom/Controllers/CpuTune.py
M mom/HypervisorInterfaces/libvirtInterface.py
M mom/HypervisorInterfaces/vdsmInterface.py
6 files changed, 225 insertions(+), 0 deletions(-)

Approvals:
  Adam Litke: Looks good to me, approved
  Kobi Ianko: Verified



-- 
To view, visit http://gerrit.ovirt.org/27240
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I31428499ae7b34cafa3eacf5ca0d7a39eabe23ec
Gerrit-PatchSet: 12
Gerrit-Project: mom
Gerrit-Branch: master
Gerrit-Owner: Kobi Ianko <kobi at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik at redhat.com>
Gerrit-Reviewer: Kobi Ianko <kobi at redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: automation at ovirt.org



More information about the Engine-commits mailing list