| Summary: | as the number of subs increases, dashboard page gets slower | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Chris Duryee <cduryee> | ||||
| Component: | Performance | Assignee: | Chris Duryee <cduryee> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Lukas Zapletal <lzap> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 6.2.0 | CC: | bbuckingham, dmoessne, lzap, mmccune, rplevka, sthirugn | ||||
| Target Milestone: | Unspecified | Keywords: | Regression, Triaged | ||||
| Target Release: | Unused | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| URL: | http://projects.theforeman.org/issues/14723 | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | rubygem-katello-3.0.0.31-1,rubygem-katello-3.0.0.31-1 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2016-07-27 11:41:54 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: | |||||
| Attachments: |
|
||||||
|
Description
Chris Duryee
2016-04-19 22:05:04 UTC
WORKAROUND NOTE: if the dashboard page is slow, one workaround is to remove the "current subscription status" widget. This gets really intense with 'Any Context' set for Organization. Loading the dashboard also blocks switching the context. The upstream patch should save some time off of the dashboard. However if you have many, many orgs, it will still be somewhat slow. At best, we need to make one call to candlepin per org to find the number of active pools for each org. Moving to POST since upstream bug http://projects.theforeman.org/issues/14723 has been closed Verified on snap 15:
[root@tyan-gt24-03 ~]# rpm -q satellite katello foreman
satellite-6.2.0-15.1.beta.el7sat.noarch
katello-3.0.0-8.el7sat.noarch
foreman-1.11.0.38-1.el7sat.noarch
[root@tyan-gt24-03 ~]# grep reduce /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.49/app/views/dashboard/_subscription_status_widget.html.erb
<% total_active_subscriptions = organizations.map {|org| org.active_pools_count}.reduce(:+) %>
Instead of subscriptions-all call, there is now get of /candlepin/owners/MyOrg/pools?attribute=unmapped_guests_only:!true
I am not measuring how much faster this is, the key here is it works as expected and dashboard works fine (attaching PNG image).
2016-06-22 04:30:24,325 [thread=http-bio-8443-exec-2] [req=7139e66b-6bda-410a-94a8-4aab0a0498f8, org=] INFO org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/owners/MyOrg/info
2016-06-22 04:30:24,580 [thread=http-bio-8443-exec-2] [req=7139e66b-6bda-410a-94a8-4aab0a0498f8, org=MyOrg] INFO org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=255
2016-06-22 04:30:24,630 [thread=http-bio-8443-exec-9] [req=f961e147-04bb-4e8e-9498-36c07df3cfc5, org=] INFO org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/owners/MyOrg/pools?attribute=unmapped_guests_only:!true
2016-06-22 04:30:24,923 [thread=http-bio-8443-exec-9] [req=f961e147-04bb-4e8e-9498-36c07df3cfc5, org=MyOrg] INFO org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=294
Created attachment 1170635 [details]
Dashboard works fine
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. https://access.redhat.com/errata/RHBA-2016:1501 |