Bug #24576

Improve MonitorEventQueue performance for large workloads

Added by Justin Sherrill almost 2 years ago. Updated almost 2 years ago.

Target version:
Bugzilla link:
Fixed in Releases:
Found in Releases:


Cloned from

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.

Associated revisions

Revision 00954691 (diff)
Added by Justin Sherrill almost 2 years ago

Fixes #24576 - improve Event Queue performance

previosly the event was processed in the task, requiring the task
to be notified for each and every event. With a lot of hosts,
this could be 10s of thousands of events. The act of notifying
the task, ends up reducing performance for not much benefit.
This changes it to process the event within the poller thread,
rather than the main task


#1 Updated by The Foreman Bot almost 2 years ago

  • Assignee set to Justin Sherrill
  • Status changed from New to Ready For Testing
  • Pull request added

#2 Updated by Jonathon Turel almost 2 years ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.9.0

#3 Updated by Justin Sherrill almost 2 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF