Skip to content
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

Slow merge with large repos #9642

Open
2 of 7 tasks
twpedersen opened this issue Jan 8, 2020 · 5 comments
Open
2 of 7 tasks

Slow merge with large repos #9642

twpedersen opened this issue Jan 8, 2020 · 5 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented performance/bigrepo Performance Issues affecting Big Repositories

Comments

@twpedersen
Copy link

twpedersen commented Jan 8, 2020

  • Gitea version (or commit ref): First seen in 1.9.6, but also exists in 1.10.2
  • Git version: 2.22.0
  • Operating system: gitea docker image
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No (clone fails)
    • Not relevant
  • Log gist:

Description

note: This issue is not seen in 1.11.0+dev-575-g1e9b3d474

To reproduce:

On 1.8.3+2-g11f6ed4f8 the merge takes a few seconds. It seems this issue was originally reported in #601 and #6287 then fixed in #4921 and resurfaced somewhere between 1.8.2 and 1.9.6.

top shows /usr/libexec/git-core/git rev-list --objects --stdin --not --all --quiet using 100% CPU during merge. Generating the commit-graph doesn't help.

@bagasme
Copy link
Contributor

bagasme commented Jan 8, 2020

@twpedersen what about your system spec?

@lunny lunny added the performance/bigrepo Performance Issues affecting Big Repositories label Jan 8, 2020
@twpedersen
Copy link
Author

twpedersen commented Jan 8, 2020

@bagasme merge takes > 1 minute on a ryzen 3900x. Interestingly it seems to take about the same amount of time on an i3-9100. The git rev-list runs twice for about 30s each, so maybe they're timing out in both cases?

@zeripath
Copy link
Contributor

zeripath commented Jan 8, 2020

I suspect the problem is not the merge but at the push in the end - in particular there are a few calls in there to count objects that are quite slow. Others have found this before.

If you can, you could put logging in to test where the problems are.

One other thing that can improve things is ensuring that the git commit graph is built.

@lafriks
Copy link
Member

lafriks commented Jan 8, 2020

We should probably run commit counting in queue to make it async, that should considerably improve performance

@stale
Copy link

stale bot commented Mar 8, 2020

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale stale bot added the issue/stale label Mar 8, 2020
@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Mar 9, 2020
@stale stale bot removed the issue/stale label Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented performance/bigrepo Performance Issues affecting Big Repositories
Projects
None yet
Development

No branches or pull requests

5 participants