memory hungry gitlab

Turns out that gitlab is quite the memory hog – inhaling everything your system has.

As I’m running on a virtualized environment adding extra memory is not a quick, easy, or cheap solution.

So we can use some good old swap space.

So we add swap space to our system. As root, do the following:

dd if=/dev/zero of=/swapfile bs=1024 count=1048576
mkswap /swapfile
chown root:root /swapfile
chmod 0600 /swapfile
swapon /swapfile

Then add the following line to your /etc/fstab to mount the swap space automatically on boot:
/swapfile swap swap defaults 0 0

Thanks to NIX CRAFT for the article “Linux Add a Swap File – Howto“.