Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2000144

Summary: GetBundleForChannel registry endpoint performs significant needless work
Product: OpenShift Container Platform Reporter: Ben Luddy <bluddy>
Component: OLMAssignee: Ben Luddy <bluddy>
OLM sub component: OLM QA Contact: kuiwang
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: davegord, hshukla, krizza, sdharma, sjenning
Version: 4.9   
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-18 17:50:51 UTC Type: Bug
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: 2002026    

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