Chaz Hagen
Chaz Hagen

Reputation: 81

Unbelievably Slow GitLab with MySQL

I manage a large GitLab server, with multiple large repos.

Performance has been very inconsistent, but most of the time it is very, very slow. In larger projects, where we have 50+ branches, it takes almost an entire minute to access the 'merge requests' page, or the 'branches' page itself.

The logs don't appear to reveal much - if I need to provide any please let me know.
I have tried to restart the server and manually 'git gc' each repo, to no avail.

The front page of GitLab also takes forever to load.
We connect to a MySQL database and were wondering if perhaps that is contributing to the lag.

At this point I'm not sure what is causing the lag and how to determine it.
I would love any help. Please let me know if I can give anymore information.

Upvotes: 4

Views: 4416

Answers (3)

VonC
VonC

Reputation: 1324757

We connect to a MySQL database and were wondering if perhaps that is contributing to the lag

Five years later, it is official (from Gabriel Mazetto)

We just removed support for MySQL at @gitlab (12.1, June 2019): MR (Merge Request) 29790.

Having to support two different, partially compatible databases has slowed us down multiple times.
We can now move faster than ever and use more advanced @PostgreSQL features.

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

Over the years MySQL has been nothing but a pain in the ass.
It's support for modern SQL features is limited, GitLab's internal knowledge of it is limited, and for many new features we need to introduce branches in the code to support both PostgreSQL and MySQL.

Upvotes: 1

tylerdurdenfc1999
tylerdurdenfc1999

Reputation: 31

As mentioned you may have better luck at Server Fault or the GitLab mailing list.

You should review the different components of GitLab and try to determine the bottleneck causing the slowness:

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 components have been configured to match your hardware and you still see slowness, you'll need to improve the hardware running your installation.

The GitLab documentation (requirements page) mentions:

If you have enough RAM memory and a recent CPU the speed of GitLab is mainly limited by hard drive seek times. Having a fast drive (7200 RPM and up) or a solid state drive (SSD) will improve the responsiveness of GitLab.

Upvotes: 3

xCNPx
xCNPx

Reputation: 605

I would agree with the commenter. This IS a little bit off topic for this site.

However, I would suggest doing some DB maintenance. Clear out your closed merge requests, issues, obsolete milestones from the db. Over time these things can add up to a lot and slow down your instance considerably.

Hope this helps you!

Upvotes: 1

Related Questions