John Siu Blog

Tech - Business Tool, Personal Toys

Tiny VPS Git Server

☰ Table of Content

GitLab CE and Gogs in VPS.


GitLab CE

Early last year I upgraded my vps box. The main reason: GitLab CE.

GitLab CE properly is one of the best open source, free, mature and actively maintained git server package. It is feature rich, come with beautiful user interface, and backed by commercial development team. You really cannot ask for more.

I was sold once I had it up and running. Except one issue, GitLab is a resource hog. It constantly push my then tiny vps’ memory to the limit. That pushed me to upgrade my box.

I did not look back till a few months ago, when my development focus switched from AngularJS to Angular, of which the development process is closely tie to node.js. And node.js, in turn, is closely tie to git. I started asking myself, wouldn’t there be a node.js base git server out there, similar to GitLab, but using much less resource?

No! (surprise!?) … But …

Gogs - Go Git Server

I did not find a node.js one, but one written in GO Lang: Gogs.

Gogs interface closely resemble Github. I have no complain about the UI. As a younger project(>2yrs) than GitLab(>5yr), while feature complete, Gogs still have some rough edges. But as an open source project with an active development team, there is no worry about project continuation.

What make Gogs so attractive? Extremely low resource requirement! Following is quote from its website:

Gogs has low minimal requirements and can run on an inexpensive Raspberry Pi. Some users even run Gogs instances on their NAS devices.

Numbers Talk

Lets look at their resource consumption while idling in my vps.

GitLab CE Resources

%CPU%MEMVSZRSSCOMMAND
00.241.85Mb2.10Mb/usr/bin/redis-server 127.0.0.1:0
1.925646.73Mb256.98Mbunicorn_rails master
024.4646.73Mb250.39Mbunicorn_rails worker[0]
00.4131.12Mb4.25Mbgitlab-workhorse
226.3837.74Mb269.65Mbsidekiq 4.0.1 gitlab [0 of 2 busy]

GitLab CE has 6 processes, and I already tuned them to the bare minimum. I excluded mySQL (which is required), as it is also used by WordPress.

Gogs Resources

%CPU%MEMVSZRSSCOMMAND
02.4641.65Mb25.42Mb/home/git/gogs/gogs web

Gogs only has one process!

You already know my choice.

John Siu

Update: 2020-08-19
Tag
[git]
[vps]
comments powered by Disqus