Project

General

Profile

Actions

Bug #20508

closed

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

Added by Daniel Kimsey over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Hosts
Target version:
Difficulty:
Triaged:
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.


Files

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

Updated by Daniel Kimsey over 7 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
Actions #2

Updated by Justin Sherrill over 7 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.

Actions #3

Updated by Justin Sherrill over 7 years ago

  • Assignee set to Justin Sherrill
  • Target version set to 208
  • Translation missing: en.field_release set to 250
Actions #4

Updated by Brad Buckingham over 7 years ago

  • Status changed from New to Assigned
Actions #5

Updated by Denis Müller over 7 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.

Actions #6

Updated by Brad Buckingham over 7 years ago

  • Target version changed from 208 to 213
Actions #7

Updated by Daniel Kimsey over 7 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.

Actions #8

Updated by The Foreman Bot over 7 years ago

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

Updated by Justin Sherrill over 7 years ago

  • Bugzilla link set to 1491798
Actions #10

Updated by Brad Buckingham over 7 years ago

  • Target version changed from 213 to 217
Actions #11

Updated by Justin Sherrill over 7 years ago

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

Also available in: Atom PDF