Bug 1816464 - Decreased performance in GenerateApplicability in 6.6 [NEEDINFO]
Summary: Decreased performance in GenerateApplicability in 6.6
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.6.0
Hardware: Unspecified
OS: Unspecified
high vote
Target Milestone: 6.7.4
Assignee: satellite6-bugs
QA Contact: Lucie Vrtelova
Depends On:
TreeView+ depends on / blocked
Reported: 2020-03-24 03:47 UTC by Mike McCune
Modified: 2021-04-06 17:45 UTC (History)
13 users (show)

Fixed In Version: pulp-,pulp-
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-09-30 13:12:09 UTC
Target Upstream Version:
pcreech: needinfo? (satellite6-bugs)

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Pulp Redmine 6387 0 Normal CLOSED - CURRENTRELEASE modular applicability profiles are not cleaned up properly 2020-05-19 16:32:41 UTC
Red Hat Product Errata RHSA-2020:4127 0 None None None 2020-09-30 13:12:21 UTC

Description Mike McCune 2020-03-24 03:47:37 UTC
Back in the 6.3 era we had a bug where the Pulp monthly maintenance was not being ran:


We are seeing reports that GenerateApplicability performance seems to be worse in 6.6 so I did some digging. Part of the diagnosis routine for the above bug was to check the 2 collections and note if there was a significant size difference:


I've checked with an older customer 6.5 database and get the following counts:

> db.repo_profile_applicability.find().size()
>  db.consumers.find().size()

Checking with another customer with similar sized database on 6.6 shows a greater than 10x ratio which was causing performance issues in older versions:

> db.repo_profile_applicability.find().size()
>  db.consumers.find().size()

I checked and the montly maintenance is being ran and running it manually returns very quickly (5 seconds):

 celery.worker.strategy:INFO: Received task: pulp.server.maintenance.monthly.queue_monthly_maintenance[5a5aefbd-dd52-42b5-8d38-2c3b65053f27]
 celery.worker.strategy:INFO: Received task: pulp.server.maintenance.monthly.monthly_maintenance[7c4e5227-9572-439d-99e0-9ad938c9fc9c]
 celery.app.trace:INFO: [5a5aefbd] Task pulp.server.maintenance.monthly.queue_monthly_maintenance[5a5aefbd-dd52-42b5-8d38-2c3b65053f27] succeeded in 0.0373372323811s: None
 pulp.server.managers.consumer.applicability:INFO: [7c4e5227] Orphaned consumer profiles to process: 2253
 pulp.server.managers.consumer.applicability:INFO: [7c4e5227] Orphaned consumer profiles processed: 2253
 celery.app.trace:INFO: [7c4e5227] Task pulp.server.maintenance.monthly.monthly_maintenance[7c4e5227-9572-439d-99e0-9ad938c9fc9c] succeeded in 5.05477944389s: None

yet the size of repo_profile_applicability remains large.

Comment 3 Mike McCune 2020-03-24 03:49:53 UTC
On 3/23/20 9:07 AM, Tatiana Tereshchenko wrote:
> In 6.6, applicability calculation for modularity was introduced.
> It means that profile counter should be roughly doubled in comparison to 
> the consumer one.
> A situation when the applicability profile is orphaned but not cleaned 
> up is when consumer system has changes in RPMs installed but not in 
> modules and vice versa.
> I wouldn't expect this to happen that often so the numbers of 
> applicability increases that much, except the non-modular repositories 
> case which should be handled separately.

> On the system which you shared, there are many modular applicability 
> profiles for consumers with no modularity content, maybe this case is 
> not handled correctly during the clean up stage.

Comment 4 pulp-infra@redhat.com 2020-03-28 12:53:34 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 5 pulp-infra@redhat.com 2020-03-28 12:53:35 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 6 pulp-infra@redhat.com 2020-05-08 19:30:40 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 7 pulp-infra@redhat.com 2020-05-08 22:14:11 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 11 pulp-infra@redhat.com 2020-05-19 14:31:52 UTC
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.

Comment 12 pulp-infra@redhat.com 2020-05-19 16:32:42 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 22 errata-xmlrpc 2020-09-30 13:12:09 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: Satellite 6.7.4 Async Bug Fix 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.


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