Bug 976089 - finding systems consuming a subscription very slow
Summary: finding systems consuming a subscription very slow
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Subscription Asset Manager
Classification: Retired
Component: candlepin
Version: 1.3
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Bryan Kearney
QA Contact: Tazim Kolhar
URL:
Whiteboard:
Depends On:
Blocks: sam13-tracker 995944
TreeView+ depends on / blocked
 
Reported: 2013-06-19 21:05 UTC by Tom McKay
Modified: 2016-04-26 00:55 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
: 995944 (view as bug list)
Environment:
Last Closed: 2013-10-01 10:58:36 UTC
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2013:1390 0 normal SHIPPED_LIVE Release 1.3 of Subscription Asset Manager 2013-10-01 14:43:14 UTC

Description Tom McKay 2013-06-19 21:05:42 UTC
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 16:55:55 UTC
https://github.com/candlepin/candlepin/pull/306


Adds a new api which is /pools/{pool_id}/entitlements

Comment 3 Bryan Kearney 2013-07-01 14:06:37 UTC
commit 3fda508fb2007f4950d5c3b7b327353e3a650544
Author: Bryan Kearney <bkearney>
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 18:52:14 UTC
SNAP0 contains these bug fixes. Moving to ON_QA.

Comment 5 Tazim Kolhar 2013-08-13 07:59:36 UTC
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 10:58:36 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.

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.