Incredibly Slow GitLab with MySQL

I am running a large GitLab server with several large repositories.

Performance was very inconsistent, but in most cases it is very, very slow. On larger projects where we have 50+ branches, it takes almost a full minute to access the Pull Requests page or the β€œBranches” page itself.

The logs don't seem to show much - if I have to provide any, please let me know.
I have tried rebooting the server and manually " git gc

" each repo, to no avail.

The GitLab homepage always loads as well.
We connected to a MySQL database and wondered if this could contribute to the lag.

At the moment I'm not sure what is causing the lag and how to define it.
I would like any help. Please let me know if I can give more information.

+4


source to share


3 answers


As mentioned, you might be in luck with Server Fault or the GitLab mailing list .

You should look at the various components of GitLab and try to identify the slow bottleneck:

https://github.com/gitlabhq/gitlabhq/blob/master/doc/development/architecture.md



Depending on your installation, you may need to optimize the configuration of one or many of these components. If all the components are tuned to fit your hardware and you still see slowness, then you need to improve your rig's hardware.

The GitLab documentation (requirements page) mentions:

If you have enough RAM and the latest processor, the speed of GitLab is mainly due to the limited search time for the hard drive. Having a fast drive (7200 rpm and above), or solid state drive (SSD) will improve the sensitivity of GitLab.

+3


source


I would agree with the commentator. This is a bit off topic for this site.

However, I would suggest doing some DB maintenance. Clean up your closed merge requests, issues, obsolete steps from db. Over time, these things can add a lot and slow down your instance significantly.



Hope this helps you!

+1


source


We connected to a MySQL database and wondered if this could contribute to the lag

Five years later, it's official (by Gabriel Masetto )

We just removed MySQL support on @gitlab (12.1, Jun 2019): MR (Pull Request) 29790 .

The need to maintain two different, partially compatible databases slowed us down several times.
We can now move faster than ever and use the more complex @PostgreSQL functions.

Issue 52442 comes from issue 51173 which was ... clear:

Over the years, MySQL has been nothing more than a pain in the ass.
Support for modern SQL functions is limited, GitLab's internal knowledge of this is limited, and for many new features we need to branch in code to support both PostgreSQL and MySQL.

0


source







All Articles