Reducing disk usage

From ULYSSIS documentation

This page discusses what happens when you use more disk space than has been allotted to your account (your quota) and how to reduce your disk usage. This page is also useful if you want to reduce your disk usage even if you're not using more than your quota. You can check your current disk usage as well as your quota on https://ucc.ulyssis.org/quota .

What happens when I go over my quota?

If you are using more disk space than the allowed quota for your account type for more than seven consecutive days (the so called grace period), you will no longer be able to write any additional files or extend existing files. You will probably no longer be able to edit websites on your account or it might even stop working outright. If you haven't configured a forwarder for your username@ulyssis.org email address, you will lose emails sent to this address. The grace period of seven days is intended for you to have time to reduce your disk space. You will receive an email every day reminding you that you are using too much disk space. In order to prevent impact on other users in cases where disk usage within an account suddenly and substantially surges, an additional quota slightly higher than your normal quota is imposed, independent of any grace period.

Identifying which files & folders use the most disk space

It is not always easy to immediately identify what is taking up space on your account. Sadly, there are no dependable cross-platform tools to help with this. Instead, we will be using the command line tool ncdu, which runs directly on one of our shell servers. You do not need to be proficient with command line interfaces in order to use this tool, the step-by-step manual below will guide you through the process. However, should you get stuck, do not hesitate to contact us at ulyssis@ulyssis.org.

  • Connect through SSH to one of the shell servers: https://docs.ulyssis.org/Accessing_shell_servers_over_SSH
  • Type in ncdu and press enter. You will then see that ncdu is scanning your account.
  • Once ncdu has finished scanning, it will display which files or folders located directly in your home directory are using the most disk space. When the filename stars with / it is a folder. The results are ordered by size, so it makes most sense to start with the top items.
  • Disk usage ncdu.png
    You can select different files/folders using the up and down arrow keys, navigate the directory structure using either the enter and backspace keys or the left and right arrows to move in and out of folders, quit ncdu by pressing q and delete a file or folder with d. Be careful to not delete files you still need as you will need to contact us in order to restore them from a backup.
  • You can check your progress on https://ucc.ulyssis.org/quota. The percentage and values displayed are always current and accurate, there is no delay.

Common sources of unnecessary disk usage

  • Deleted emails (or emails in general): if you have deleted a substantial amount of emails (or some emails with large attachments) and they still exist in the Trash folder of your @ulyssis.org email account, they might take op a large amount of disk space. In order to actually delete them you will gave to empty this Trash folder. You can do this on https://webmail.ulyssis.org or by deleting the folder Maildir/.Trash using ncdu (see previous section).
  • Old websites: if you have older websites on your account that you are no longer using, it might be worth removing them in their entirety. If the deleted website uses a database (this will always be the case if your using WordPress, MediaWiki or another popular CMS), then you can delete that as well through our control panel: https://ucc.ulyssis.org. If this website had an associated (sub)domain, please send us an email to have it removed.
  • Unused images: in the case of many CMS's (WordPress, Drupal, ...), removing an image from a post will not delete it. For example, in the case of WordPress it will still be available through the Media Library. In order to reclaim the disk space used by the image, you will have to delete it there as well.
  • Large images: images are often several MBs in size and often have a large resolution. While this is great for editing, printing, ..., such large sizes are not all that useful for inclusion in a webpage. They can make your side load slower and use more disk space without a significant increase in quality. You should therefore consider resizing images before uploading them or installing a plugin that reduces their size on upload. However, do watch out for plugins that keep the original image around as this will not reduce but increase your disk usage. For a tutorial on how to resize images, you can take a look at https://wordpress.com/support/media/image-optimization/. This tutorial is geared towards WordPress, but is also applicable in general. If you are using MediaWiki, we have written a plugin that reduces the size of various type of files. You can find more details on Setting up MediaWiki - Extensions.
  • Backups: ULYSSIS makes daily backups of all account data, including databases, and keeps them for at least a month. It is therefore not necessary to make automated backups of your own, for example with plugins like Updraft in the case of WordPress. Although it is a good practice to make backups whenever you make changes to your site (for example, before performing updates), it is not necessary to keep them after you have verified that your site still works.