Bug 1269966

Summary: Slow UI Response Time on Content View when selecting repositories to add
Product: Red Hat Satellite Reporter: Stuart Auchterlonie <sauchter>
Component: PerformanceAssignee: Walden Raines <walden>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.2CC: bkearney, bugzilla_rhn, cduryee, cwelton, jsherril, kdixon, walden
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-11 23:21:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1317008    

Description Stuart Auchterlonie 2015-10-08 16:02:59 UTC
Description of problem:

Loading the list of possible repositories to add to a content
view take an excessive amount of time.

On my test Satellite I only have ~28 repositories and it took
over 90 seconds for this list to be generated.

For our customers with many more repositories this will be an
order of magnitude larger

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

Sat-6.1.2

How reproducible:


Steps to Reproduce:
1. Go to a content view
2. Select "Yum Content > Repositories"
3. Select "Add"

Actual results:

Waiting. a lot of it

Expected results:

This should not take this long for so few repositories

Additional info:

the foreman rake process was taking 90-100% cpu time for
most of this. 

foreman production log for this

** Select "Yum Content > Repositories" - this is the current list
** with 2 repositories

2015-10-08 16:39:36 [I] Processing by Katello::Api::V2::RepositoriesController#index as JSON
2015-10-08 16:39:36 [I]   Parameters: {"content_type"=>"yum", "content_view_id"=>"9", "full_result"=>"true", "organization_id"=>"3", "page"=>"1", "search"=>"", "api_version"=>"v2"}
2015-10-08 16:39:49 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.67/app/views/katello/api/v2/repositories/index.json.rabl within katello/api/v2/layouts/collection (12270.3ms)
2015-10-08 16:39:49 [I] Completed 200 OK in 13345ms (Views: 12097.3ms | ActiveRecord: 216.8ms)

** Select "Add" tab - this is the one that takes ~90s

2015-10-08 16:40:04 [I] Processing by Katello::Api::V2::RepositoriesController#index as JSON
2015-10-08 16:40:04 [I]   Parameters: {"content_type"=>"yum", "full_result"=>"true", "library"=>"true", "organization_id"=>"3", "page"=>"1", "search"=>"", "api_version"=>"v2"}
2015-10-08 16:41:36 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.67/app/views/katello/api/v2/repositories/index.json.rabl within katello/api/v2/layouts/collection (91816.2ms)
2015-10-08 16:41:36 [I] Completed 200 OK in 92218ms (Views: 91438.5ms | ActiveRecord: 383.6ms)

Comment 4 Justin Sherrill 2016-08-29 20:24:21 UTC
this is likely solved by 6.2

Comment 5 Stuart Auchterlonie 2016-08-30 08:51:21 UTC
Certainly looks an order of magnitude better to me
This is from my sat 6.2 test system which is running on the
same hardware model as my 6.1 test system.

2016-08-30 09:33:22 [app] [I] Processing by Katello::Api::V2::RepositoriesController#index as JSON
2016-08-30 09:33:22 [app] [I]   Parameters: {"available_for"=>"content_view", "content_type"=>"yum", "content_view_id"=>"3", "full_result"=>"true", "library"=>"true", "organization_id"=>"1", "page"=>"1", "search"=>"", "api_version"=>"v2"}
2016-08-30 09:33:22 [app] [I]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.70/app/views/katello/api/v2/repositories/index.json.rabl within katello/api/v2/layouts/collection (455.3ms)
2016-08-30 09:33:22 [app] [I] Completed 200 OK in 496ms (Views: 325.2ms | ActiveRecord: 141.6ms)

versus what I put in the original bug report

2015-10-08 16:40:04 [I] Processing by Katello::Api::V2::RepositoriesController#index as JSON
2015-10-08 16:40:04 [I]   Parameters: {"content_type"=>"yum", "full_result"=>"true", "library"=>"true", "organization_id"=>"3", "page"=>"1", "search"=>"", "api_version"=>"v2"}
2015-10-08 16:41:36 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.67/app/views/katello/api/v2/repositories/index.json.rabl within katello/api/v2/layouts/collection (91816.2ms)
2015-10-08 16:41:36 [I] Completed 200 OK in 92218ms (Views: 91438.5ms | ActiveRecord: 383.6ms)