Bug 913295 - FindByVirtUUID causing high DB load
Summary: FindByVirtUUID causing high DB load
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Bryan Kearney
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel70
TreeView+ depends on / blocked
 
Reported: 2013-02-20 21:34 UTC by Andrew Edwards
Modified: 2016-04-18 06:00 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-25 15:25:50 UTC
Embargoed:


Attachments (Terms of Use)

Description Andrew Edwards 2013-02-20 21:34:04 UTC
Description of problem:
Customers with virtual guest are causing high load on the database.
*bugzilla created for historical purpose, issue already addressed*

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Populate a candlepin instance wiht a large number of consumers/consumer facts (9 million rows in our environment for facts)
2. Create a consumer with guest
3. Update consumer with new guest
  
Actual results:
Updating consumere may time out or take an extremely long time. Taking several minutes in our prod environment.

Expected results:
Updating consumers with virtual guest on candlepin instances with large number of consumer facts has similar performance to customers without guests.

Additional info:

Comment 1 Bryan Kearney 2013-02-20 21:36:42 UTC
commit 15589772c0e1265606991cd26c4abfbc467dd71b
Author: Bryan Kearney <bkearney>
Date:   Mon Feb 18 14:11:04 2013 -0500

    Improve the performance is checking for guests for a given host.
    
    This patch removes a sub-select from the query in lieu of using joins. Joins tend to be much more performant. This does hardcode the table 
    
    During the research, it was pointed out that this query should facter in the owner to handle the cases where two owners have guests witht h


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