Bug #20508
closedExtremely slow /api/v2/hosts, 200hosts/page takes about 40s to display
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
Updated by Daniel Kimsey about 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
Updated by Justin Sherrill about 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.
Updated by Justin Sherrill about 7 years ago
- Assignee set to Justin Sherrill
- Target version set to 208
- Translation missing: en.field_release set to 250
Updated by Brad Buckingham about 7 years ago
- Status changed from New to Assigned
Updated by Denis Müller about 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.
Updated by Brad Buckingham about 7 years ago
- Target version changed from 208 to 213
Updated by Daniel Kimsey about 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.
Updated by The Foreman Bot about 7 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/6953 added
Updated by Brad Buckingham about 7 years ago
- Target version changed from 213 to 217
Updated by Justin Sherrill about 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset katello|59c52f6787e1a446aa8690fec28d9159ac0d2103.