Bug 1330307
Summary: | product API call with 'enabled=true' slow, causing product page to load slowly | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Adam Price <adprice> | ||||
Component: | Performance | Assignee: | Adam Price <adprice> | ||||
Status: | CLOSED ERRATA | QA Contact: | |||||
Severity: | high | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.2.0 | CC: | bbuckingham, cduryee, cwelton, mmccune, oprazak, peter.vreman, sthirugn | ||||
Target Milestone: | Unspecified | Keywords: | Triaged | ||||
Target Release: | Unused | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
URL: | http://projects.theforeman.org/issues/14259 | ||||||
Whiteboard: | |||||||
Fixed In Version: | rubygem-katello-3.0.0.27-1,rubygem-katello-3.0.0.34-1 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2016-07-27 11:40:19 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1122832 | ||||||
Attachments: |
|
Description
Adam Price
2016-04-25 20:38:56 UTC
Created from redmine issue http://projects.theforeman.org/issues/14259 Upstream bug assigned to adprice Moving to POST since upstream bug http://projects.theforeman.org/issues/14259 has been closed second PR [1] merged to katello master. [1] https://github.com/Katello/katello/pull/6012 *** Bug 1271160 has been marked as a duplicate of this bug. *** Created attachment 1163060 [details]
Product page listing performance
enabled=true does not seem to have a negative impact on performance when listing products any more.
Verified on RHEL 7, snap 13.1
The patch works for me and reduces the time by 2.5 times. But it is still > 5 seconds that is expected to list 30 products as set on the expectation in the the marked as duplicate BZ1271160 Before the Patch: [crash] root@li-lc-1578:~# time curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost/katello/api/v2/organizations/3/products | jq .total 36 real 0m20.379s user 0m0.184s sys 0m0.060s After the Patch: [crash] root@li-lc-1578:~# time curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost/katello/api/v2/organizations/3/products | jq .total 36 real 0m8.492s user 0m0.192s sys 0m0.047s The above test was with https://patch-diff.githubusercontent.com/raw/Katello/katello/pull/5991.diff applied. Now with also https://patch-diff.githubusercontent.com/raw/Katello/katello/pull/6012.diff is is slightly better, but still > 5 seconds: [crash] root@li-lc-1578:~# time curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost/katello/api/v2/organizations/3/products | jq .total 36 real 0m6.724s user 0m0.185s sys 0m0.051s It is visible that with PR6012 applied that size is reduced from 24860 to 14216 bytes: Without PR6012: [crash] root@li-lc-1578:~# time curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost/katello/api/v2/organizations/3/products | wc -c 24860 real 0m7.374s user 0m0.181s sys 0m0.057s With PR6012: [crash] root@li-lc-1578:~# time curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost/katello/api/v2/organizations/3/products | wc -c 14216 real 0m6.348s user 0m0.180s sys 0m0.052s 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. https://access.redhat.com/errata/RHBA-2016:1501 |