Bug 1021980 - Foreman dashboard is very slow for non admin users in a large environment
Foreman dashboard is very slow for non admin users in a large environment
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Provisioning (Show other bugs)
Unspecified Unspecified
unspecified Severity medium (vote)
: Beta
: --
Assigned To: Dmitri Dolguikh
Katello QA List
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2013-10-22 08:41 EDT by Chuck Schweizer
Modified: 2016-07-27 04:40 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-07-27 04:40:39 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 5841 None None None 2016-04-22 11:14 EDT

  None (edit)
Description Chuck Schweizer 2013-10-22 08:41:17 EDT
Description of problem:

A non admin user takes a very long time to load the Dashboard page if they have many nodes. In this instance there were 18,700 nodes returned. The following is the query most/all of the time is spent on. Possibly this should be a join or something more efficient than an IN list.

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

Validated it still exists on foreman 1.3

How reproducible:
easily reproducible if you have a large number of nodes.

Steps to Reproduce:
1.  Add a large number of nodes to foreman/satellite
2.  login as a non admin user
3.  go to the foreman dashboard

Actual results:
Page take a very long time to load.

Expected results:
Page should load in a few seconds.

Additional info:

This is the specific query

Report Load (181884.5ms)  SELECT "reports".* FROM "reports" WHERE "reports"."host_id" IN (15632, 1364, 6679, 12390, 7214, 1387, 8102, 10022, 14954, 782, 9807, 16707, 19704, 14674, 9565, 10311, 2396, 638, 8698, 10085, 278, 371, 16729, 586, 642,
<----- cut  ----->
12460, 1717, 10215, 10568, 10469, 9631, 5912, 2390, 2434, 11247, 5749, 5275, 15752, 8620, 59, 7299, 7696, 6026, 8782, 11067, 13031, 8884, 18279, 10776, 19298, 19214, 17388, 294, 2033, 3398) AND (status != 0) AND (("reports"."reported_at" >= '2013-08-22')) ORDER BY "reports"."reported_at" DESC NULLS LAST LIMIT 6
Comment 2 Dominic Cleal 2013-10-22 09:12:31 EDT
Fixed in 83b2874539b2b5469586a23b1edacbdf2a88d2ef in develop.
Comment 6 Dominic Cleal 2014-05-22 14:28:27 EDT
Chuck's reported that Foreman's introduced a regression and it's slowed down again.  It appears that the move to the new authorisation system's caused it as the method concerned has been split into a step to pull back all of the host IDs and then another to look up reports.  It needs dev work again to see if this can be optimised.
Comment 8 Bryan Kearney 2015-08-25 13:35:54 EDT
Upstream bug component is Provisioning
Comment 9 Bryan Kearney 2015-08-25 16:39:19 EDT
Upstream bug component is Provisioning
Comment 14 errata-xmlrpc 2016-07-27 04:40:39 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.


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