Bug 1811865

Summary: [Scale] Host Monitoring generates excessive amount of qos related sql queries
Product: Red Hat Enterprise Virtualization Manager Reporter: eraviv
Component: ovirt-engineAssignee: eraviv
Status: CLOSED ERRATA QA Contact: mlehrer
Severity: medium Docs Contact:
Priority: low    
Version: 4.3.0CC: dagur, dholler, mlehrer, mperina, mtessun
Target Milestone: ovirt-4.4.0Keywords: Performance
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhv-4.4.0-28 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-04 13:21:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Idle 10 mins post reboot capture query counts none

Description eraviv 2020-03-10 01:43:17 UTC
Description of problem:

Host monitoring generates too many 'getqosbyqosid' queries.



Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. create 95 host environment with 300 vlans on one host interface (non mgmt)
2. Setup: 
- Webadmin is closed
- No REST calls
- VdsRefreshRate=default
- Host in UP status
3. let engine run idle for 15 minutes after startup
4. count 'getqosbyqosid' queries to db with db pg_stat_statements in 10 minutes

Actual results:
~1.6 million 'getqosbyqosid' queries over the 10 minute period

Expected results:
~57 thousand 'getqosbyqosid' queries over the 10 minute period 

Additional info:
https://docs.google.com/document/d/1-Mv2JjDkV2gKiXsomVKCtMf5r4TZbxjiFRtbygBd-fU/edit?usp=sharing

Comment 2 mlehrer 2020-05-12 10:50:43 UTC
Created attachment 1687655 [details]
Idle 10 mins post reboot capture query counts

#Env: 150 Hosts with 100 networks
4.4.0-0.31.master.el8
HE environment with 200 nested hosts of which 150 hosts have 100 networks per host.
DWH separated and JVM set to 4G with engine set with with 200 pool connections / 250 db connections.



# /usr/share/ovirt-engine/dbscripts/engine-psql.sh -c ""SELECT count(*) from vds_interface_view""
 count 
-------
 15825
(1 row)"


getqosbyqosid executed 60,320

Comment 5 errata-xmlrpc 2020-08-04 13:21:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: RHV Manager (ovirt-engine) 4.4 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:3247