Bug 2000144 - GetBundleForChannel registry endpoint performs significant needless work
Summary: GetBundleForChannel registry endpoint performs significant needless work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.9
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.9.0
Assignee: Ben Luddy
QA Contact: kuiwang
URL:
Whiteboard:
Depends On:
Blocks: 2002026
TreeView+ depends on / blocked
 
Reported: 2021-09-01 13:59 UTC by Ben Luddy
Modified: 2022-10-11 08:56 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-18 17:50:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift operator-framework-olm pull 179 0 None None None 2021-09-01 14:05:44 UTC
Red Hat Product Errata RHSA-2021:3759 0 None None None 2021-10-18 17:51:03 UTC

Description Ben Luddy 2021-09-01 13:59:43 UTC
Description of problem:

The RPC api.Registry/GetBundleForChannel is consumed only by
package-server and by declarative index conversion. Neither reads any
field other than CsvName and CsvJson. The package-server generates one
call to this RPC per channel per package per catalog and is
responsible for needlessly large CPU utilization and resident set
sizes on registry pods. Removing the additional per-request processing
and database queries that populate unused fields makes the registry
server better able to absorb the bursty load from package-server.

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

How reproducible: Always

Steps to Reproduce:

1. extract the certified registry database:

$ docker cp $(docker create registry.redhat.io/redhat/certified-operator-index:v4.9):/database/index.db certified.db

2. serve the extracted content:

$ opm registry serve -d certified.db

2. install ghz (https://ghz.sh/docs/install)
3. run a benchmark:

$ ghz -d '{"pkgName":"mongodb-enterprise","channelName":"stable"}' --insecure --concurrency=50 --duration=10s --call=api.Registry/GetBundleForChannel localhost:50051

Expected results: Significantly more requests should be completed during the benchmark (on my machine the number increased by more than 4x).

Comment 6 errata-xmlrpc 2021-10-18 17:50:51 UTC
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 (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), 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/RHSA-2021:3759


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