Managing Storage

How to handle storage on your fedihost instance. At fedihost we take care of getting your video files transcoded and streamed to viewers. But one thing that is in your hands is storage.

The Upload Process

When your video files are uploaded to peertube they are placed in storage drive, from there they are transcoded (converted) into various smaller files to be streamed to viewers. The original uploaded file is then deleted.

Video Files Use Storage

Common default resolutions are 480p (Standard Definition) and 1080p (High Definition), but you can enable many different resolutions that are even higher and lower.

The original uploaded file and these smaller files can add up to a lot of space when you have hundreds of videos so it is something you need to keep an eye on.

What Happens When You Run Out?

Things “get weird” when you run out of storage space. This means bad performance, corrupted processes and errors that are hard to fix. That’s why on Fedihost when you are approaching the limit, you will get a warning email so you have a chance to act. If you hit the limit we will automatically upgrade you to a higher storage plan to avoid the problems associated with hitting a hard storage limit.

It is natural for a peertube instance to grow over time as your users upload more videos. However this easy solution can become quite costly, so we recommend having a look at the other options below for your server.

How To Handle Running Out of Storage?

1. Reduce Transcode Resolutions

Higher resolution files have higher files sizes. If you are transcoding to 480p, 1080p, 1440p, 2160p it may make sense to disable transcodes to those higher resolutions. A 2160p (4K) file is actually around 4 times larger than a 1080p (HD) file.

This table shows our latest test with a few different test video files.

Resolution2 Minute Video Size15 Minute Video Size
2160p247.0 MB1852.5
1440p120.2 MB901.5
1080p78.6 MB589.5
720p41.5 MB311.25
480p24.0 MB180
360p17.3 MB129.75
240p11.3 MB84.75
144p7.5 MB56.25
Audio4.6 MB34.5

You can toggle off higher resolution transcodes settings by going to Administration > Configuration > VOD Transcoding and then scrolling down to the transcoding section to uncheck larger resolutions.

2. Reduce Number of Transcodes

It isn’t really necessary to have 8 different resolutions of a video. It uses a lot of storage space and also means that the webtorrent feature of Peertube which speeds up downloads by sharing files peer to peer is less effective.

We recommend having 2 different resolutions. A low resolution for people on slower internet connections, and a higher resolution option for people on fast connections.

3. Disable Web Video

Peertube transcodes videos to two different formats. Web Video (previously known as "WebTorrent") and HLS with P2P support. Supporting both these formats means you use twice the storage.

We recommend using only HLS because according to PeerTube the video playback in the PeerTube web client is better.

You can toggle the setting off in the VOD transcoding section Administration > Configuration > VOD Transcoding

4. Trim Certain Transcoded Files

If you go to the “Videos” section of your administration panel you can see the various file sizes of each transcoded file.

You may find some culprits there which are using a large amount of data. One common culprit is multi-hour podcast or livestream recordings. Some people choose to selectively delete the larger resolution versions of these files. Another option would be to delete the higher resolutions.

5. Check Redundancy Settings

Peertube has an option to supply redundancy for other instances. This is not enabled by default, but it may have been turned on.

Check the status of this in the federation section by going to: Administration > Federation > Video Redundancies

And choose "Remove videos duplicated by my instance" from the Display dropdown.

video redundancies
page

6. Delete Videos

It’s obvious, but do you still need certain old videos? You can sort videos by views, if it is no longer getting any maybe it could be trimmed especially if it is particularly long.

7. User Limits

Some users may be uploading too much. You can set upload quotas for new users under Administration > Configuration or target specific users bu opening their profile under Administration > Users and choosing a "Daily Quota" and overall "Video Quota"