
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: I66aa9723d3cfc6fc1c1d36a3bf42086abd010f26 Reviewed-on: http://gerrit.ovirt.org/27240 Tested-by: Kobi Ianko <kobi@redhat.com> Reviewed-by: Adam Litke <alitke@redhat.com> Signed-off-by: Kobi Ianko <kianku@redhat.com> Reviewed-on: http://gerrit.ovirt.org/28815 Tested-by: Adam Litke <alitke@redhat.com> --- M mom/Collectors/Collector.py A mom/Collectors/GuestCpuTune.py A mom/Collectors/HostCpu.py M mom/Collectors/Makefile.am A mom/Controllers/CpuTune.py M mom/Controllers/Makefile.am M mom/HypervisorInterfaces/libvirtInterface.py M mom/HypervisorInterfaces/vdsmInterface.py 8 files changed, 248 insertions(+), 0 deletions(-) Approvals: Adam Litke: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/28815 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I66aa9723d3cfc6fc1c1d36a3bf42086abd010f26 Gerrit-PatchSet: 5 Gerrit-Project: mom Gerrit-Branch: master Gerrit-Owner: Kobi Ianko <kobi@redhat.com> Gerrit-Reviewer: Adam Litke <alitke@redhat.com> Gerrit-Reviewer: Kobi Ianko <kobi@redhat.com> Gerrit-Reviewer: Martin Sivák <msivak@redhat.com> Gerrit-Reviewer: automation@ovirt.org