Bug 1417437 - Listing Applicable hosts for any errata takes long time at scale
Summary: Listing Applicable hosts for any errata takes long time at scale
Keywords:
Status: CLOSED DUPLICATE of bug 1417642
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Errata Management
Version: 6.2.6
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: Unspecified
Assignee: John Mitsch
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-29 10:51 UTC by Pradeep Kumar Surisetty
Modified: 2017-02-23 18:02 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-23 18:02:55 UTC
Target Upstream Version:


Attachments (Terms of Use)
postgresql mem @errata for 4k (64.71 KB, image/png)
2017-01-29 11:18 UTC, Pradeep Kumar Surisetty
no flags Details
postgresql opetations (132.40 KB, image/png)
2017-01-29 11:19 UTC, Pradeep Kumar Surisetty
no flags Details
memory growth while listing applicable hosts for errata (87.79 KB, image/png)
2017-01-29 11:22 UTC, Pradeep Kumar Surisetty
no flags Details
ruby memory growth while listing 4k hosts for errata (68.77 KB, image/png)
2017-01-29 11:24 UTC, Pradeep Kumar Surisetty
no flags Details
memory usage per process (26.17 KB, text/plain)
2017-01-29 11:26 UTC, Pradeep Kumar Surisetty
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 18652 0 None None None 2017-02-23 16:43:32 UTC

Description Pradeep Kumar Surisetty 2017-01-29 10:51:11 UTC
Description of problem:

Have 6k hosts registered to setup.
Selected an errata which is applicable for 4K+ hosts. Took more than 6 mins to list

content -> errata -> any errata -> Applicable content Hosts of respective errata

GET https://gprfc018.sbu.lab.eng.bos.redhat.com/api/v...h=(+applicable_errata+%3D+%22RHBA-2015:2115%22+) 200 OK 	6m 35s

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


How reproducible:


Steps to Reproduce:
1.with Scale environment
 content -> errata -> any errata -> Applicable content Hosts of respective errata
2. 
3.

Actual results:

List Applicable content Hosts of respective errata at scale takes long time

Expected results:

Take lesser time to open 
Additional info:

Comment 3 Pradeep Kumar Surisetty 2017-01-29 11:18:31 UTC
Created attachment 1245533 [details]
postgresql mem @errata for 4k

Comment 4 Pradeep Kumar Surisetty 2017-01-29 11:19:42 UTC
Created attachment 1245534 [details]
postgresql opetations

Comment 5 Pradeep Kumar Surisetty 2017-01-29 11:22:00 UTC
Created attachment 1245535 [details]
memory growth while listing applicable hosts for errata

Comment 6 Pradeep Kumar Surisetty 2017-01-29 11:24:04 UTC
Created attachment 1245537 [details]
ruby memory growth while listing 4k hosts for errata

Comment 7 Pradeep Kumar Surisetty 2017-01-29 11:26:01 UTC
Created attachment 1245538 [details]
memory usage per process

while true; do   (date && ps aux --sort -rss | head -n20) >> /var/log/foreman/ps-aux2.log;   sleep 60; done

Comment 8 Jan Hutař 2017-01-29 14:13:23 UTC
I have configured logging of queries longer than 1sec:

  log_min_duration_statement = 1000

and refreshed the page, but it did not shown anything. Then I have displayed number of transactions processed by server (well, one transaction can have 0 - more queries), refreshed the page and checked the transaction count again:

  postgres=# SELECT sum(xact_commit+xact_rollback) FROM pg_stat_database;
    sum   
  --------
   810380
  (1 row)

...refresh and wait:

  postgres=# SELECT sum(xact_commit+xact_rollback) FROM pg_stat_database;
    sum   
  --------
   939428
  (1 row)

I.e. almost 130k transactions to refresh one page. Well, there is something else running on the Satllite, but still.

Comment 10 John Mitsch 2017-02-23 16:43:29 UTC
Created redmine issue http://projects.theforeman.org/issues/18652 from this bug

Comment 11 John Mitsch 2017-02-23 17:42:35 UTC
I'm not seeing this behavior on the reproducer anymore. I'm selecting a specific Errata and going to the Content Hosts tab. Is this the correct workflow?

Comment 12 Pradeep Kumar Surisetty 2017-02-23 18:02:55 UTC

*** This bug has been marked as a duplicate of bug 1417642 ***


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