Live data from Hacker News

Scaling the GitLab database

about.gitlab.com

41–50 of 114 posts

Re: Scaling the GitLab database

#41
post #2

Did you consider trying NewSQL DBs that would let you scale horizontally with much less complexity? Curious to see if the performance is comparable yet.

Are you talking about NoSQL databases, like Mongo and Redis?

I think NewSQL refers to database systems that still enforce ACID transactions, but use various strategies to avoid the scalability difficulties that have traditionally been associated with RDBMS as both consistent and available systems.

https://en.wikipedia.org/wiki/NewSQL

Re: Scaling the GitLab database

#42
post #32

for anyone new to gitlab, it is a bear. even their own cluster/HA documentation is mostly just a thin roadmap to a final goal. a statement of intent if you will. There are just far too many moving parts in this software and the glaring problem of "ruby doesnt scale well" is everpresent. packaged releases depend entirely on a bundled chef installation to get everything out the door and running. The software tries to d…

> and the glaring problem of "ruby doesnt scale well" is everpresent GitLab has many performance problems (and many have been solved over the years), but Ruby has thus far not been one of them.

I remember installing GitLab on a small NAS-type box. It was a while ago, but on each start-up it ran a nodejs tool to pre-compile some assets, I suppose. On that machine, it took 10-15 minutes to start. Afterwards, the unicorn workers kept getting killed because the default memory limit (128 MB) wasn't enough to process more than literally a couple of requests. It did work, but pages took 2-5 seconds to load, which I couldn't stand.

For anyone needing a small Git Web UI, I suggest https://github.com/go-gitea/gitea.

EDIT: Oh, you're that guy ^^;.

Anyway, my rant was probably a bit harsh. I know that GitLab isn't really written for hardware comparable to a Raspberry Pi and that it's used by small and large teams all over the world. But on my hardware Gitea renders pages in 20-100 ms, which is orders of magnitude faster than GitLab. I'm sure part of this is the fault of the language.

Re: Scaling the GitLab database

#43
I am a bit disappointed at this article and the hierarchy of how to optimise postgres. As a MySQL specialist that has worked on a few Postgres projects, I can tell you that Postgres has a VERY RICH toolkit to speed things up. Between optimising queries and load balancing, you have indexing, partitioning.. (Postgres even allows you to index EACH partition differently) and triggers to do summary/rollup tables for you.

Its just that Postgres may need a little more coding and is less automatic than MySQL that people shy away from it..

I do like the time and information spent about spreading load accross database servers and not nearly enough people are considering splitting reads and writes from a master/slave setup.

Its just that its frustrating to me that engineers view databases as some sort of mysterious black box that you need to solve by working around it or replacing it entirely.

Re: Scaling the GitLab database

#44

Other options available: - CockroachDB 1.1 - AWS RDS Aurora PostgreSQL-compatibility [1] https://news.ycombinator.com/item?id=15458900 [2] https://news.ycombinator.com/item?id=13072861

CockroachDB is a really cool product, but I think by all accounts it is still nowhere near performant enough to be used in production.

Alternative is Google Spanner. Also still new, but already in GA for 5 months now.

Re: Scaling the GitLab database

#45

Earlier quoted context omitted.

> and the glaring problem of "ruby doesnt scale well" is everpresent GitLab has many performance problems (and many have been solved over the years), but Ruby has thus far not been one of them.

I remember installing GitLab on a small NAS-type box. It was a while ago, but on each start-up it ran a nodejs tool to pre-compile some assets, I suppose. On that machine, it took 10-15 minutes to start. Afterwards, the unicorn workers kept getting killed because the default memory limit (128 MB) wasn't enough to process more than literally a couple of requests. It did work, but pages took 2-5 seconds to load, which…

IIRC this step is not needed/required anymore.

Re: Scaling the GitLab database

#46

Earlier quoted context omitted.

> and the glaring problem of "ruby doesnt scale well" is everpresent GitLab has many performance problems (and many have been solved over the years), but Ruby has thus far not been one of them.

I remember installing GitLab on a small NAS-type box. It was a while ago, but on each start-up it ran a nodejs tool to pre-compile some assets, I suppose. On that machine, it took 10-15 minutes to start. Afterwards, the unicorn workers kept getting killed because the default memory limit (128 MB) wasn't enough to process more than literally a couple of requests. It did work, but pages took 2-5 seconds to load, which…

That sounds like the webpack development server was somehow started, which definitely is not required (or even recommended) for production setups.

Re: Scaling the GitLab database

#47

Apparently I should stop using gitlab.com By choosing to not shard your data you have basically put a cap on scalability... or at least one which will be reached faster than if you were to decide to shard.

Following that same logic you probably should stop using a lot of websites out there.

Re: Scaling the GitLab database

#48

It's interesting to see what parts of the product GitLab is struggling with compared to GitHub, e.g. https://githubengineering.com/stretching-spokes/

Most of our problems thus far have been the result of misuse of our resources one way or another. GitHub on the other hand probably dealt with these issues earlier on (or are able to hide them somehow, perhaps by throwing a lot of physical hardware at the problem), thus they can now focus on dealing with problems caused by reaching the limits of their (old) systems.

Re: Scaling the GitLab database

#49
post #8

Earlier quoted context omitted.

No, because it probably would have required a complete rewrite of GitLab to make it work.

User mentioned "trying". With an app that gets this much use, it might be reasonable to take a small piece and fork all writes to both the current + an experimental DB and then A/B test the reads. If this type of abstraction requires "a complete rewrite of GitLab" for "trying NewSQL DBs" then something is amiss.

It would require a complete rewrite for at least the data layer, as everything right now assumes an RDBMS. Further it would complicate installation as now everybody would have to use a fancy "NewSQL" database, some of which you may not even be able to run yourself.

Re: Scaling the GitLab database

#50

Earlier quoted context omitted.

CockroachDB is a really cool product, but I think by all accounts it is still nowhere near performant enough to be used in production.

Alternative is Google Spanner. Also still new, but already in GA for 5 months now.

The spanner setup that can match PG on a high end x86 cluster will run way over 100K month
Post reply on HN