Bug 1720976

Summary: [logging] limit getAllVmIoTunePolicies
Product: [oVirt] mom Reporter: Germano Veit Michel <gveitmic>
Component: GeneralAssignee: Tomáš Golembiovský <tgolembi>
Status: CLOSED CURRENTRELEASE QA Contact: Qin Yuan <qiyuan>
Severity: low Docs Contact:
Priority: unspecified    
Version: 0.6.2CC: ahadas, akrejcir, bugs, gdeolive, lsurette, michal.skrivanek, msivak, srevivo, ycui
Target Milestone: ovirt-4.5.2Keywords: ZStream
Target Release: 0.6.3Flags: sbonazzo: ovirt-4.5+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: mom-0.6.3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-30 08:47:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Germano Veit Michel 2019-06-17 03:27:43 UTC
Description of problem:

The following is logged in full every 15s:

2019-06-17 12:01:14,258+1000 INFO  (jsonrpc/0) [api.host] FINISH getAllVmIoTunePolicies return={'status': {'message': 'Done', 'code': 0}, 'io_tune_policies_dict': {'177aef33-ec53-4e3e-a437-955186a08aef': {'policy': [], 'current_values': [{'ioTune': {'write_bytes_sec': 0L, 'total_iops_sec': 0L, 'read_iops_sec': 0L, 'read_bytes_sec': 0L, 'write_iops_sec': 0L, 'total_bytes_sec': 0L}, 'path': u'/rhev/data-center/mnt/storage.rhev.gsslab.bne.redhat.com:_exports_data/6e608093-de3e-43b0-92d5-5da642d9e526/images/6fcc7760-6872-4403-91df-5a67a897caa3/2f3a7410-fcbb-4829-8b80-1d7d7f234d14', 'name': 'vda'}]}}} from=::1,39750 (api:54)

I don't think this data is dynamic enough to make it worth logging every 15s, it could be suppressed and logged every N calls like some other logs. Maybe even hourly is enough, or even sent to debug as we can get it from libvirt.

It produces a considerable number of lines in VDSM logs:
# grep getAllVmIoTunePolicies /var/log/vdsm/vdsm.log | wc -l
1158

Version-Release number of selected component (if applicable):
vdsm-4.30.13-4.el7ev.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Some VMs and check VDSM logs for getAllVmIoTunePolicies

Comment 1 Ryan Barry 2019-06-18 00:09:54 UTC
Likely 4.5, but no milestone yet

Comment 2 Michal Skrivanek 2019-09-11 13:22:01 UTC
I would rather suggest to revise the interval in mom in the first place. IIRC it's not supposed to change at all, moving this to e.g. 5min would be ok too.

Comment 3 Andrej Krejcir 2019-09-11 13:45:00 UTC
The I/O QoS settings can be changed on a running VM, and mom has to know the actual settings.

We could change the code, so that vdsm would notify mom if the QoS has changed, and then we could also increase the polling interval in mom.

Comment 4 Michal Skrivanek 2021-08-20 08:14:44 UTC
I still think comment #2 would be perfectly sufficient and significantly improve the noise and load on libvirt

Comment 5 Milan Zamazal 2021-08-23 15:42:34 UTC
If it is indeed not supposed to change at all then increasing the query interval in MoM looks like an easy fix. If it can change and we want a timely update, we can make such a change too. We should be able to add another call to the MoM interface and call it on the policy changes, in addition to increasing the query interval, as Andrej suggested. And yes, querying stats from libvirt that often is useless, MoM cares only about the policy. (Nothing new in this comment, just confirming what has already been said.)

Comment 7 Tomáš Golembiovský 2022-07-20 11:56:09 UTC
Modified the cache expiration to 5 minutes.

Comment 8 Qin Yuan 2022-08-04 09:42:07 UTC
Verified with mom-0.6.3-1.el8ev.noarch. getAllVmIoTunePolicies is logged every 5 minutes in vdsm log.

Comment 9 Sandro Bonazzola 2022-08-30 08:47:42 UTC
This bugzilla is included in oVirt 4.5.2 release, published on August 10th 2022.
Since the problem described in this bug report should be resolved in oVirt 4.5.2 release, it has been closed with a resolution of CURRENT RELEASE.
If the solution does not work for you, please open a new bug report.