Bug 2191657

Summary: Importing Red Hat Repository Import on Disconnected Red Hat Satellite taking huge time around 5 hours
Product: Red Hat Satellite Reporter: Odilon Sousa <osousa>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Vladimír Sedmík <vsedmik>
Severity: high Docs Contact:
Priority: high    
Version: 6.11.4CC: ahumbe, dalley, dkliban, ggainey, jpasqual, lmjachky, pcreech, rchan, vsedmik
Target Milestone: 6.13.1Keywords: Performance, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: pulpcore-3.21.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2170485 Environment:
Last Closed: 2023-05-31 15:28:22 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:

Comment 1 Vladimír Sedmík 2023-05-15 09:36:44 UTC
Verified in 6.13.1 snap 1 (python39-pulpcore-3.21.6-1.el8pc.noarch) on a VM with 32 GB RAM, 8 CPU, 500 GB storage. The import times were compared to an unpatched Satellite running on a different VM with same RAM/CPU/storage size.   

Steps to verify:
1) Sync RHEL8 AppStream RPMs repo with immediate download policy and perform 'complete repository' export. The repository contains 29342 packages and export takes 88 GB of space.  
2) Sync it again and perform 'incremental repository' export (no content was added actually, but metadata). The export takes just 78 MB.
3) Copy the exports to the importing Satellites (unpatched and patched). Set the default download policy to immediate and upload manifest.
4) Import the complete data, then import the incremental data, measure the task times.

On the unpatched Satellite the complete import took
real	106m33.193s
user	0m14.962s
sys	0m1.889s

and incremental import took
real	53m3.873s
user	0m8.168s
sys	0m1.022s

On the patched Satellite the complete import took
real	84m22.443s
user	0m13.049s
sys	0m1.731s

and incremental import took
real	28m52.590s
user	0m4.893s
sys	0m0.600s

As we can see:
1) the complete import time was improved by ~21 %
2) the incremental import time was improved by ~46 %
3) incremental/complete import time ratio improved from ~50 % to ~34 %.

Given the results I consider the BZ as verified.

Comment 6 errata-xmlrpc 2023-05-31 15:28:22 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: Satellite 6.13.1 Async 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-2023:3387