Bug 976089 - finding systems consuming a subscription very slow
finding systems consuming a subscription very slow
Status: CLOSED ERRATA
Product: Subscription Asset Manager
Classification: Red Hat
Component: candlepin (Show other bugs)
1.3
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Bryan Kearney
Tazim Kolhar
:
Depends On:
Blocks: sam13-tracker 995944
  Show dependency treegraph
 
Reported: 2013-06-19 17:05 EDT by Tom McKay
Modified: 2016-04-25 20:55 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 995944 (view as bug list)
Environment:
Last Closed: 2013-10-01 06:58:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Subscriptions Unit (91.34 KB, image/png)
2013-08-13 03:59 EDT, Tazim Kolhar
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2013:1390 normal SHIPPED_LIVE Release 1.3 of Subscription Asset Manager 2013-10-01 10:43:14 EDT

  None (edit)
Description Tom McKay 2013-06-19 17:05:42 EDT
https://github.com/Katello/katello/blob/master/app/models/glue/candlepin/consumer.rb?source=cc#L519

Entitlements from all_by_pool() and all_by_pool_id() gets all from entirety of candlepin, then reduces it to a specific pool id. This action has been seen to be very slow on a setup with several hundreds of subscriptions. Worse, if one org has a lot of entitlements, it will slow down all other orgs as well.

Possible optimizations:
+ limit entitlements to owner (org)
+ limit entitlements to pool id

The UI sees this slowness in the Subscription->Units tab
Comment 2 Bryan Kearney 2013-06-28 12:55:55 EDT
https://github.com/candlepin/candlepin/pull/306


Adds a new api which is /pools/{pool_id}/entitlements
Comment 3 Bryan Kearney 2013-07-01 10:06:37 EDT
commit 3fda508fb2007f4950d5c3b7b327353e3a650544
Author: Bryan Kearney <bkearney@redhat.com>
Date:   Fri Jun 28 12:53:32 2013 -0400

    976089: Expose new api to get entitlements for a pool
    
    This new API is at /pools/{pool_id}/entitlements. This API should be
    more performant then iterating over all the entitlements.
Comment 4 Bryan Kearney 2013-08-02 14:52:14 EDT
SNAP0 contains these bug fixes. Moving to ON_QA.
Comment 5 Tazim Kolhar 2013-08-13 03:59:36 EDT
Created attachment 786026 [details]
Subscriptions Unit

VERIFIED :

# rpm -qa | grep katello
katello-selinux-1.4.4-2.el6sat.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-certs-tools-1.4.2-2.el6sat.noarch
katello-cli-common-1.4.3-5.el6sat.noarch
katello-cli-1.4.3-5.el6sat.noarch
katello-common-1.4.3-6.el6sam_splice.noarch
katello-configure-1.4.4-2.el6sat.noarch
katello-glue-elasticsearch-1.4.3-6.el6sam_splice.noarch
katello-headpin-all-1.4.3-6.el6sam_splice.noarch
katello-glue-candlepin-1.4.3-6.el6sam_splice.noarch
signo-katello-0.0.10-2.el6sat.noarch
katello-headpin-1.4.3-6.el6sam_splice.noarch
Comment 7 errata-xmlrpc 2013-10-01 06:58:36 EDT
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.

http://rhn.redhat.com/errata/RHEA-2013-1390.html

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