<commit_before>---
layout: post
title: "The hardware that powers 100,000 git repositories"
date: 2015-01-03
comments: true
author: <NAME>
image_title: '/images/stock/hardware.jpg'

---

Want to host your public and private repositories somewhere for free?
You can on GitLab.com, where we have been hosting a single instance of GitLab for a while now.
Almost 20,000 people make active use of this to host their
repositories. The 100,000+ repositories these people are served by a single server.

<!-- more -->

## A single server

Before, GitLab.com was hosted on Amazon's largest instance.
But as the amount of users grew, so did our Amazon bill.
On top of that, we were limited in options of vertical scaling and were CPU bound.
We had to explore alternatives to AWS.

100k repositories take up several terabytes, so storage capabilities are important.
Since we use git, the storage needs to be a one disk volume filesystem,
rather than object storage (such as S3).
We want to be able to expand storage with ease.
Furthermore, thousands of people pushing and pulling their code will put a strain on the CPU.
Having many CPU cores available can make a big differences in times of high load.

It turns out that using our own servers was by far the cheapest option.
Considering we're bootstrapping GitLab
and as cheap Dutchmen (Sytse, Jacob, Job), this made the choice easy.

![htop on GitLab server](/images/stock/htop.png)

And so,  we currently have two (one active) of these servers running GitLab.com:

- server model: HP DL180 G6 (reconditioned, this model was introduced in 2009)
- processors: 2x X5690 (24 cores in total)
- 32GB RAM
- 12x 2TB HDDs, (2 for root volume in RAID 1, 10 for storage in RAID 10, ext4 filesystem)

We actually started with a total of 16 cores,
but replaced the CPUs to decrease CPU-bound loading.

## Falling and Failing over

Moving away from Amazon meant that we no longer could use AWS' features.
In case a server dies, we need to be able to failover.<commit_msg>additional changes<commit_after>---
layout: post
title: "The hardware that powers 100,000 git repositories"
date: 2015-01-03
comments: true
author: <NAME>
image_title: '/images/stock/hardware.jpg'

---

Want to host your public and private repositories somewhere for free?
You can on GitLab.com, where we have been hosting a single instance of GitLab for a while now.
Almost 20,000 people make active use of this to host their
repositories. The 100,000+ repositories that these people use are served by a single server.

<!-- more -->

## A single server

Before, GitLab.com was hosted on Amazon's largest instance.
But as the amount of users grew, so did our Amazon bill.
On top of that, we were limited in options of vertical scaling and were CPU bound.
We had to explore alternatives to AWS.

100k repositories take up several terabytes, so storage capabilities are important.
Since we use git, the storage needs to be a single filesystem,
rather than object storage (such as S3).
We want to be able to expand storage with ease.
Furthermore, thousands of people pushing and pulling their code will put a strain on the CPU.
Having many CPU cores available can make a big differences in times of high load.

It turns out that using our own servers was by far the cheapest option.
Considering we're bootstrapping GitLab
and as cheap Dutchmen (Sytse, Jacob, Job), this made the choice easy.

![htop on GitLab server](/images/stock/htop.png)

And so,  we currently have two (one active) of these servers running GitLab.com:

- server model: HP DL180 G6 (reconditioned, this model was introduced in 2009)
- processors: 2x X5690 (24 cores in total)
- 32GB RAM
- 12x 2TB HDDs, (2 for root volume in RAID 1, 10 for storage in RAID 10, ext4 filesystem)

We actually started with a total of 16 cores,
but replaced the CPUs to decrease CPU-bound loading.

## Falling and Failing over

Moving away from Amazon meant that we no longer could use AWS' features.
In case a server dies, we need to be able to failover.
{'fraction_non_alphanumeric': 0.056485878530367406, 'fraction_numerical': 0.02899275181204699, 'mean_word_length': 4.117647058823529, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2894727', 'n_tokens_mistral': 1226, 'n_tokens_neox': 1058, 'n_words': 646}