Poor network throughput, limited to PeerTube
-
I'm not sure if this is a Cloudron issue or a PeerTube issue, but I thought I'd ask here: Does Cloudron's installation of Peertube have a hard network speed limit?
Long story short, I am unable to stream videos above roughly 35 Mb/s bitrate. The video will constantly stop and rebuffer. When I download a video from my Cloudron Peertube instance, it maxes out at around 32 Mb/s. My home ISP is 300/300 fiber and my remote server has a gigabit uplink. I'm able to upload / download files using Jirafeau on Cloudron at the full 300 Mb/s, and speedtests from the server confirm consistent network throughput over 900 Mb/s.
This may very well be a Peertube problem, but since it doesn't seem to be common, I thought I'd ask here. I looked in local-production.json and production.yaml but didn't see anything referencing speed limits. Maybe a Docker thing?
EDIT: It's also possible that there's some disk I/O throttling happening? Peertube is the only app running on the server, an E3-1250 v5 with an NVMe.
-
The speed is affected as you wrote disk, and may even be poor quality network hardware hosting. I, too, experience poor quality Contabo network at my place. I had better performance on Hetzner Cloud and plan to return.
-
@vividly8450 what speeds do you get on uniteddiversity.tv and bridport.tv ?
-
@matix131997 Agree, and Contabo was my first thought. I switched to another provider and am now using a dedicated server (Xeon E3-1250v5, 32GB DDR3, 1 TB NVMe, no other apps running) on a gigabit uplink. Actual speeds are full 300 in both directions tested from home, and near gigabit using speedtest.
It's weird: streaming and downloads are capped at exactly 4 MB/s, which roughly corresponds with the bitrate where videos start choking. For any other app I install, network throughput is fine.
-
@vividly8450 4MB/s ? This looks like a hosting limitation. Which hosting are you using ?
-
@matix131997 It's probably not a host limit.
First host was a Contabo VPS. The second host is a Fiberstate dedicated server. On Contabo, I was clearing 200 Mb/s easy. They have their network problems but 200 is more than enough elbow room to stream a 35 Mb/s video. On Fiberstate, I have a gigabit port and I'm clearing 900+ bidirectional to multiple speedtest nodes around the country. I'm also clearing nearly 300 in both directions to my home.
I'd also like to point out that other apps are fine. When I installed Jirafeau on the Fiberstate server, I was easily pushing nearly 300 both up and down.
Only Peertube is affected, and there appears to be a hard limit of 4 MB/s (approximately 32 Mb/s).
TL/DR: Two different hosts, two different datacenters, two different network routes, two different servers, and everything works except Peertube.
-
@vividly8450
You need to know that the fact that the hosting offers 1 gigabit quite cheaply does not mean that you will get it. This is in my opinion an easy way to attract customers.I looked at the website and you can see in the picture with the switch is shared and the question is what is the bandwidth to the switch, the number of packets per second to the servers. Speedtest can show you correctly, because everyone sets the priority.
And as for PeerTube, you need to know that it does not work in the form of a single file as you think. It works in the form of a packet and the question is whether the switch/routing is properly set up to handle it that way.
In my case with Contabo. Speed according to the offer, but the stability of the network at a poor level. There is one day with works well, and the next flap there are problems with downloading or uploading because the network is overloaded. This server hosts Nextcloud and today I started a gradual migration of data to S3 Storage and I will be changing the server.
-
@matix131997 You're not wrong on your assessment of ports on shared hosts. However, as I've stated several times, I am fully saturating my home network connection (300/300) on this server using other apps. On the Contabo server, I was able to achieve 200+ consistently. Speeds on Peertube (and ONLY Peertube) are consistently hard capped at 4 MB/s. Bandwidth is definitely not the problem.
Peertube presents the option to download the file directly, and this is capped as well.
This is not an upstream network issue.
-
I found the issue with some help from their Git. I'm posting it here because it's not well-documented and doesn't seem to be mentioned anywhere else. (EDIT: Hats off to the dev, who upon seeing my Git post went and updated the documentation to specifically recommend reviewing this directive!)
Peertube DOES throttle network speed! A fresh install is limited to 5 MB/s. This is fine for 1080P but barely adequate for typical 30 FPS 4K footage, and unworkable for high-quality 4K or 4K at 60 FPS. For perspective, YouTube recommends nearly 9 MB/s for 60FPS 4K video.
You can adjust this hard limit by modifying peertube.conf and adjusting the values listed below:
- proxy_limit_rate
- $peertube_limit_rate
You should take your network performance, desired video quality, and download functionality into consideration before modifying these. For most people, 10M should give you ample 4K quality without excessive buffering. If you want to allow downloads, consider setting them to 25M or higher.
I'm glad this wasn't a Cloudron issue, but I appreciate the effort of anyone who took the time to stop and think about this one. I suspect this value was different in previous versions and carries over with upgrades; this may only affect new installations.