Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1614063 - Improve MonitorEventQueue performance for large workloads
Summary: Improve MonitorEventQueue performance for large workloads
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.3.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.4.0
Assignee: Justin Sherrill
QA Contact: sbadhwar
URL:
Whiteboard:
: 1622206 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-08 22:35 UTC by Mike McCune
Modified: 2022-03-13 15:22 UTC (History)
6 users (show)

Fixed In Version: tfm-rubygem-katello-3.7.0.14-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1622206 (view as bug list)
Environment:
Last Closed: 2018-10-16 19:04:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 24576 0 Normal Closed Improve MonitorEventQueue performance for large workloads 2020-06-10 13:14:41 UTC

Description Mike McCune 2018-08-08 22:35:42 UTC
On systems with large numbers of registered hosts (20-50,000) there are cases when synchronization events may trigger large volume of entries landing in the katello_events table (40,000+ rows).

The majority of these rows are import_host_applicability events that need to be processed. This processing can often take hours and sometimes an entire day.

Due to load induced in processing all these events, there are times when foreman-tasks gets overloaded and may stop processing entirely and the queue ceases to drain.

We need to optimize the processing time of this queue of events to ensure they can be worked through in a faster manner than is being done now.

Some analysis has taken place that shows that a good portion of the work going through the katello_events table entries is SELECTS/INSERTS/UPDATES to the dynflow_steps table which can often take 100-300ms or more. We may update the routine to reduce this and perform other changes to make this task perform better.

Comment 2 Justin Sherrill 2018-08-09 20:19:03 UTC
Created redmine issue https://projects.theforeman.org/issues/24576 from this bug

Comment 3 Satellite Program 2018-08-09 22:10:21 UTC
Upstream bug assigned to jsherril

Comment 4 Satellite Program 2018-08-09 22:10:24 UTC
Upstream bug assigned to jsherril

Comment 6 Satellite Program 2018-08-20 16:10:45 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/24576 has been resolved.

Comment 11 Mike McCune 2018-09-11 14:59:37 UTC
To test a large amount of data for the MonitorEventQueue to process you can do the following:

1) Load data to be processed by the queue:

# foreman-rake console

> 1.times { Katello::Host::ContentFacet.pluck(:host_id).each { |id|::Katello::EventQueue.push_event(::Katello::Events::ImportHostApplicability::EVENT_TYPE, id)}  }

Once this completes, monitor progress in the UI on the task details, it will indicate the # of rows processed

2) You can also monitor the count in the database:

# sudo -u postgres psql -d foreman -c 'select count(*) from katello_events;'  

 count 
-------
  9331
(1 row)

Once that reaches 0 the processing is complete.  

We measured between 30-40% speed improvements in processing items in this queue before this bugfix and after.

Comment 13 Mike McCune 2018-09-20 20:12:48 UTC
*** Bug 1622206 has been marked as a duplicate of this bug. ***

Comment 14 Bryan Kearney 2018-10-16 19:04:30 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, 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-2018:2927


Note You need to log in before you can comment on or make changes to this bug.