Disk Space¶
When you've been using GitLab for a while, you might use more disk space than you are aware of. Once your disk gets full, it's time to clean up!
This document will assist you in the various choices that GitLabHost offers in freeing more disk space.
The easiest way to mitigate any disk space related issues is to purchase more disk space. You can request more disk space by emailing our Support team.
However, this is often only a temporary solution, and a lot of space might be freed by proper usage of two of GitLab's main components:
Contacting our support¶
When requesting information or destructive operations on your instance through e-mail, you should always include an ID verification code.
Artifacts¶
Retention Policy¶
The first step in cleaning up your artifacts is to check the default artifacts expiration. New instances have a default of 30 days
, but older instances might have this set to 0
, which results in endless artifacts.
Note: Changing the retention policy won't remove any existing artifacts. We can do this manually for you, see the next paragraph.
Remove old artifacts¶
We can remove all artifacts before a specific date. This is needed when you have lingering artifacts older than your retention policy. For example: When you've changed your retention policy from 0 to something else.
Note: When asking our support to remove old artifacts, please include:
- If you want to keep the artifact log files.
- The date after which you want to keep your artifacts.
- The username of an account in your GitLab instance, that is responsible for removing the artifacts.
Note: this will also remove artifacts that have been marked as 'keep' in GitLab
When you have a lot of branches¶
GitLab will keep the latest artifacts for all jobs, this might add up if you have a lot of branches. Cleaning up any stale branches is the best way to solve this. However, when that's not possible the setting can be disabled.
Artifact log files¶
The size of the artifact log files depends largely on how you are using your instance. In some cases these might get really big. Our support can advice you on the size of these log files, or can remove them for you.
Note: If you want us to remove the log files, We would need to know how far back you want to keep them.
Create an overview¶
If your artifacts are still using too much space, you can request an overview of the projects that are storing the most artifacts.
Because this might contain sensitive information, please include a way to securely receive this information. (For example: with your GPG key)
Completely wipe all artifacts¶
As a last resort, we could completely remove your artifacts folder outside of business hours. This would ensure that all new artifacts have the proper retention policy set, and no old artifacts remain.
However, this might have unattended consequences, depending on how you use artifacts in your infrastructure.
Registry¶
The container registry is easier to clean up, the only caveat is that images are not immediately deleted, but marked for deletion.
The images will be deleted when we run the container registry garbage collection at night during your preferred maintenance window.
Please see the GitLab documentation for various ways to clean up the registry.
Create an overview¶
We can create an overview of the disk space being used by the registry in the form of a csv of project+branch combinations and the amount of disk space they take.
Output format is: 99XB,group/project/branch
Note: This includes project and branch names and is therefor confidential
Known Issues¶
Disk usage statistics inconsistencies¶
The disk usage statistics in GitLab are sometimes incorrect. There is an epic that covers this issue.