Bug 1978364

Summary: Memory usage of RHV VM events is greater than necessary
Product: Migration Toolkit for Virtualization Reporter: Jeff Ortel <jortel>
Component: ControllerAssignee: Jeff Ortel <jortel>
Status: CLOSED ERRATA QA Contact: Amos Mastbaum <amastbau>
Severity: medium Docs Contact: Avital Pinnick <apinnick>
Priority: high    
Version: 2.1.0CC: fdupont, istein, mlehrer
Target Milestone: ---   
Target Release: 2.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-26 07:09:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeff Ortel 2021-07-01 16:20:29 UTC
Description of problem:

oVirt event handling has larger memory footprint than necessary.

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

2.1

How reproducible:

Always.


Steps to Reproduce:
1. Watch memory while inventory controller processing large numbers of VM events on very large RHV.  This will likely be very difficult and time consuming for QE to verify.
2. 
3.

Actual results:


Expected results:


Additional info:

Comment 2 Fabien Dupont 2021-07-01 21:21:21 UTC
This is a real performance improvement and the inventory will be more gentle with the RHV endpoint. I'm in favor of fixing it in MTV 2.1.
From a QE point of view, we should limit the verification to regressions.

Comment 3 Fabien Dupont 2021-07-05 19:49:48 UTC
Please verify with build 2.10-19 / iib:88267.

Comment 4 mlehrer 2021-08-09 08:56:11 UTC
Jeff whats the expected improvement in terms of before and after the fix, and is it seen in the inventory memory usage alone?

Comment 5 Jeff Ortel 2021-08-09 13:05:14 UTC
I'm not sure how to quantify and measure this in observed memory usage.
RHV events only have references to DataCenter, Cluster, Host, VM.  So, for events not directly pertaining to one of these resources, the handler must fetch all of the resources from both RHV and the inventory DB, compare the lists and add/update/delete in the inventory as needed to reconcile the differences.  The improvement was to do this without keeping both lists in memory.  For example for USER_FINISHED_REMOVE_DISK_ATTACHED_TO_VMS(2042) events, on a RHV with 5000 VMs, the improvement would prevent loading 10,000 VMs in memory.

Comment 6 Ilanit Stein 2021-08-16 16:23:17 UTC
Verified on MTV-2.1.0-48, by running MTV RHV tests.

Comment 9 errata-xmlrpc 2021-08-26 07:09:10 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 (Migration Toolkit for Virtualization 2.1.0), 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/RHEA-2021:3278