-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory usage in createrepo_c > 1 #443
Comments
In order to reproduce: mkdir /tmp/koji ; cd /tmp/koji Using valgrind --tool=massif /usr/bin/mergerepo_c ... seems to output a final memory usage of about:
So it's about a 10% increase. (not sure how to read the results and how to better characterize the memory usage with creatrepo_c) |
I did some testing using the reproducer and I think this kind of difference could be caused by the change of default compression. I am getting roughly the same difference just by switching from Can you try with While it takes more resources to compress, in my testing the |
@kwizart ^ |
@kontura thanks for the reminder. And yes, compression looks like a good candidate for the 10% increase. Still another side of the question is why so much memory ? (~1G, if ever the valgrind test is relevant ?) |
As usual the problem is mostly with filelists, they are fully loaded to memory and they account for more than 60% of all usage. I can think of only one issue: the packages are sorted when merged and if the input repos were sorted differently we might have to parse more packages to get the one we need (at worst we might have to parse the full metadata - but this is the current situation). However repos created by createrepo_c are sorted so I guess we could do better by around 80%. |
I have tried to reproduce with f41 createrepo_c 1.20 x86_64 (dnf5) and here I'm experiencing 10x improvements compared to createrepo_c < 1.20 memory usage. (still unsure about the numbers but it's more about 90M with tar.gz to 103 with default compression) The --compress-type=gz also gives better result with time (faster). Still trying to reproduce with older createrepo_c to compare with... |
Also (unrelated) but while trying to compute with mergerepo_c and rawhide, I wonder if merge repos ins't using both compression with multiple choice are available from a given kind. Today's rawhide seems to be generated with zstd only, but f41 ones are using both zstd and tar.gz compression... |
Current createrepo_c uses lot more memory than previous versions. There is a need to discover why and if it's legitimate.
With our koji infra migrated to createrepo_c 1+ (at rpmfusion.org), we have experienced lot or OOM error on koji regen-repo tasks. Our builders only have 4Go of RAM and previously could have handled 4 mergerepos_c (<1) tasks at the same time (one for each arches). But with createrepo_c > 1, we could only handle 3 of same without OOM.
We have found a workaround with tuning koji task weight but we need to figure out why theses task use lot more memory (about 1,1G each) over previous createrepo_c.
Side node: we are using createrepo_c from updated fedora f39/f40 (not the fedora infra-tags version when relevant).
The text was updated successfully, but these errors were encountered: