Project

General

Profile

Bug #20508

Extremely slow /api/v2/hosts, 200hosts/page takes about 40s to display

Added by Daniel Kimsey about 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Category:
Hosts
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

I noticed this when l try to pull up the content hosts view or when I was using the foreman plugin for ansible.

In short, the /api/v2/hosts call takes a very long time. With jsherril's help I've extracted some debug logs (attached). It looks like most of the SQL time is spent in lookups to rpms and errata with some more in reports.

GET --api-v2-hosts-...-.txt GET --api-v2-hosts-...-.txt 920 KB Daniel Kimsey, 08/04/2017 03:49 PM

Associated revisions

Revision 59c52f67 (diff)
Added by Justin Sherrill about 4 years ago

Fixes #20508 - cache applicability counts on content facet

History

#1 Updated by Daniel Kimsey about 4 years ago

  • Subject changed from Extremely slow /api/v2/hosts, takes about 200hosts/page takes about 40s to Extremely slow /api/v2/hosts, 200hosts/page takes about 40s to display

#2 Updated by Justin Sherrill about 4 years ago

These rpm and errata counts have been optimized quite a bit, i think the only thing left is to cache these values on the content_facet table.

#3 Updated by Justin Sherrill about 4 years ago

  • Assignee set to Justin Sherrill
  • Target version set to 208
  • Legacy Backlogs Release (now unused) set to 250

#4 Updated by Brad Buckingham about 4 years ago

  • Status changed from New to Assigned

#5 Updated by Denis Müller about 4 years ago

Daniel Kimsey wrote:

I noticed this when l try to pull up the content hosts view or when I was using the foreman plugin for ansible.

In short, the /api/v2/hosts call takes a very long time. With jsherril's help I've extracted some debug logs (attached). It looks like most of the SQL time is spent in lookups to rpms and errata with some more in reports.

Did you follow the partitioning recommendations for host?
https://access.redhat.com/documentation/en-us/red_hat_satellite/6.2/html/installation_guide/preparing_your_environment_for_installation#hardware_storage_prerequisites

This did the boost for me.

#6 Updated by Brad Buckingham about 4 years ago

  • Target version changed from 208 to 213

#7 Updated by Daniel Kimsey about 4 years ago

Sorry for the delay, I wanted to go look on the host. But yes, we did follow the sizing guidelines. We are making some tweaks based on the Appendix A section regarding large deployments though I feel that will just affect our host's registration performance and the like.

#8 Updated by The Foreman Bot about 4 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/6953 added

#9 Updated by Justin Sherrill about 4 years ago

  • Bugzilla link set to 1491798

#10 Updated by Brad Buckingham about 4 years ago

  • Target version changed from 213 to 217

#11 Updated by Justin Sherrill about 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF