Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. PeerTube
  3. Unusably Slow Playback on Peertube??

Unusably Slow Playback on Peertube??

Scheduled Pinned Locked Moved Solved PeerTube
24 Posts 4 Posters 2.3k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tshirt-chihuahuT Offline
      tshirt-chihuahuT Offline
      tshirt-chihuahu
      wrote on last edited by
      #1

      😠 Peertube playback is unusably sloooow for a 14mb HD test clip of 20 seconds.

      Current settings:

      • 4gb of RAM on an 8gb vultr instance.
      • Bumped up Redis and CPU resources as well just in case (no resources seem to be tight)

      Also:

      • I've deployed a Jellyfin instance with much less resources on the same cloudron with no problems with playback.
      • Transcoding to other resolutions is off, so it's not busy transcoding the file in the background (stock .mp4 web video.)
      • Nothing particularly interesting seems to be happening in the logs.

      The download numbers in the overlay.....
      d8a8ec9d-213d-4060-942d-59e28fb539e4-image.png

      I'm assuming Peertube at this point is a functional piece of software.....

      1. Is it something to do with federation? My use case is to just have videos behind a login for a group of <50 people. Federation isn't really needed at the moment.

      2. Any ideas as to what else I might try to make this usable?

      1 Reply Last reply
      0
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #2

        Just to rule out the obvious - do other people face the issue when using your peertube ? Maybe it's not a server issue. If you send me us a mail to support@ with the domain, we can give you some test results if you like. Or you can always post the video link here on the forum, if that works.

        tshirt-chihuahuT 1 Reply Last reply
        1
        • jdaviescoatesJ Offline
          jdaviescoatesJ Offline
          jdaviescoates
          wrote on last edited by
          #3

          @girish I've only uploaded one short test video on my PeerTube but that seems to play OK

          https://video.uniteddiversity.coop/w/9346Si65wcjFCRuGWquPEz

          I use Cloudron with Gandi & Hetzner

          tshirt-chihuahuT 1 Reply Last reply
          1
          • jdaviescoatesJ jdaviescoates

            @girish I've only uploaded one short test video on my PeerTube but that seems to play OK

            https://video.uniteddiversity.coop/w/9346Si65wcjFCRuGWquPEz

            tshirt-chihuahuT Offline
            tshirt-chihuahuT Offline
            tshirt-chihuahu
            wrote on last edited by
            #4

            @jdaviescoates thanks for this. I actually re-uploaded the same video to my instance to use it as a benchmark.

            On your instance I can see the download speed spike to a more reasonable speed to get the video buffered as shown on the peertube interface:
            b859342a-0208-4b3a-84dd-ad5c82a034b2-image.png

            This doesn't happen with mine.

            🤔 So unless there was some sort of configuration that you improved (i haven't been able to find anything in the Peertube Admin), so at least thanks to your help we've ruled out that it's something to do with the basic function of Peertube.

            1 Reply Last reply
            1
            • girishG girish

              Just to rule out the obvious - do other people face the issue when using your peertube ? Maybe it's not a server issue. If you send me us a mail to support@ with the domain, we can give you some test results if you like. Or you can always post the video link here on the forum, if that works.

              tshirt-chihuahuT Offline
              tshirt-chihuahuT Offline
              tshirt-chihuahu
              wrote on last edited by tshirt-chihuahu
              #5

              @girish I'll DM/email you. I'm out of ideas.

              Only bottlenecks I can think of are:

              1. memory(🤔 i would think this would show up in the usage graphs)
              2. cpu
              3. disk i/o (🤔 Vultr advertises SSD)
              4. network connection (🤔 seems unlikely)

              CPU seems the most likely culprit. Server has "4 vCPUs", CPU usage chart shows a spike from 18% to just under 30%:
              50663d7b-46ba-483d-8015-5d213744ae2d-image.png

              💡 Outside of my expertise here, but I believe by default Docker containers are single-threaded. On Cloudron I've got processor resource availability set to 100%, but perhaps it's possible this gets "under-reported" in the Vultr CPU usage chart because it's actually maxing out 1 of the 4 "vCPUs", but the PeerTube process is nonetheless maxed out......that's my current remaining feeble idea.

              I'll open a ticket with Vultr as well.

              subvenS 1 Reply Last reply
              0
              • tshirt-chihuahuT tshirt-chihuahu

                @girish I'll DM/email you. I'm out of ideas.

                Only bottlenecks I can think of are:

                1. memory(🤔 i would think this would show up in the usage graphs)
                2. cpu
                3. disk i/o (🤔 Vultr advertises SSD)
                4. network connection (🤔 seems unlikely)

                CPU seems the most likely culprit. Server has "4 vCPUs", CPU usage chart shows a spike from 18% to just under 30%:
                50663d7b-46ba-483d-8015-5d213744ae2d-image.png

                💡 Outside of my expertise here, but I believe by default Docker containers are single-threaded. On Cloudron I've got processor resource availability set to 100%, but perhaps it's possible this gets "under-reported" in the Vultr CPU usage chart because it's actually maxing out 1 of the 4 "vCPUs", but the PeerTube process is nonetheless maxed out......that's my current remaining feeble idea.

                I'll open a ticket with Vultr as well.

                subvenS Offline
                subvenS Offline
                subven
                wrote on last edited by
                #6

                @tshirt-chihuahu how about you answer the question first? Upload a test clip --> make it public --> try to play it with a different device and/or from another network or link it here (if this is an option).

                If your app crashes because of memory (OOM), Cloudron would notify you. If something is going wrong with your Peertube instance, the apps logs would show it. We try to think methodically and look for answers at the right spots other then guessing. Many times, the answer is blank obvious and most of the times just user error.

                tshirt-chihuahuT 1 Reply Last reply
                2
                • subvenS subven

                  @tshirt-chihuahu how about you answer the question first? Upload a test clip --> make it public --> try to play it with a different device and/or from another network or link it here (if this is an option).

                  If your app crashes because of memory (OOM), Cloudron would notify you. If something is going wrong with your Peertube instance, the apps logs would show it. We try to think methodically and look for answers at the right spots other then guessing. Many times, the answer is blank obvious and most of the times just user error.

                  tshirt-chihuahuT Offline
                  tshirt-chihuahuT Offline
                  tshirt-chihuahu
                  wrote on last edited by
                  #7

                  @subven Been working on it. Open to other hypotheses to better narrow in on the "right spots."

                  It's definitely not the device or the network—the clip kindly provided by @jdaviescoates downloads and plays just fine on same network/machine.

                  No sign of crash notifications. The app is responsive, the download speed of the video is just slow.

                  subvenS 1 Reply Last reply
                  0
                  • tshirt-chihuahuT tshirt-chihuahu

                    @subven Been working on it. Open to other hypotheses to better narrow in on the "right spots."

                    It's definitely not the device or the network—the clip kindly provided by @jdaviescoates downloads and plays just fine on same network/machine.

                    No sign of crash notifications. The app is responsive, the download speed of the video is just slow.

                    subvenS Offline
                    subvenS Offline
                    subven
                    wrote on last edited by subven
                    #8

                    @tshirt-chihuahu is your Peertubes RTMP port allowed in Vultrs firewall?

                    tshirt-chihuahuT 1 Reply Last reply
                    1
                    • subvenS subven

                      @tshirt-chihuahu is your Peertubes RTMP port allowed in Vultrs firewall?

                      tshirt-chihuahuT Offline
                      tshirt-chihuahuT Offline
                      tshirt-chihuahu
                      wrote on last edited by
                      #9

                      @subven I have not explicitly opened that port on the Vultr server, so I'll assume not. However, I had been under the impression the RTMP was only relevant to livestreaming.....
                      I'll assume that's not the case now. Thanks for the lead. 🔥

                      subvenS 1 Reply Last reply
                      0
                      • tshirt-chihuahuT tshirt-chihuahu

                        @subven I have not explicitly opened that port on the Vultr server, so I'll assume not. However, I had been under the impression the RTMP was only relevant to livestreaming.....
                        I'll assume that's not the case now. Thanks for the lead. 🔥

                        subvenS Offline
                        subvenS Offline
                        subven
                        wrote on last edited by subven
                        #10

                        @tshirt-chihuahu yeah you might be right. Just thought it could be relevant because Peertube uses a lot of federation and even torrent like downloading of videos. Normal browser playback should just work fine.

                        I did something nasty...installed a Peertube on the Cloudron demo server and uploaded a video 🤡 Download speed is around 51-61KB and it does not play play well at all (30 second 18mb file). Okay after some minutes passed I got 1mbit download speed with Chrome after a page refresh but this might be because of caching. You can check it out here until someone purges the instance ^^ I know this deployment is the worst case scenario but at least I have a fresh instance that somehow behaves the same like you described.

                        subvenS 1 Reply Last reply
                        3
                        • subvenS subven

                          @tshirt-chihuahu yeah you might be right. Just thought it could be relevant because Peertube uses a lot of federation and even torrent like downloading of videos. Normal browser playback should just work fine.

                          I did something nasty...installed a Peertube on the Cloudron demo server and uploaded a video 🤡 Download speed is around 51-61KB and it does not play play well at all (30 second 18mb file). Okay after some minutes passed I got 1mbit download speed with Chrome after a page refresh but this might be because of caching. You can check it out here until someone purges the instance ^^ I know this deployment is the worst case scenario but at least I have a fresh instance that somehow behaves the same like you described.

                          subvenS Offline
                          subvenS Offline
                          subven
                          wrote on last edited by subven
                          #11

                          @subven said in Unusably Slow Playback on Peertube??:

                          Download speed is around 51-61KB and it does not play play well at all (30 second 18mb file).

                          Got it working on the Cloudron demo instance! Go into file manager and edit production.yaml. This is what I changed:

                          - line 123 --> accept_from: 'nobody'
                          - line 201 --> enabled: false
                          - line 238 --> enabled: false

                          line 130:

                          tracker:
                            # If you disable the tracker, you disable the P2P aspect of PeerTube
                            enabled: false
                          

                          After disabling the tracker (and peertubes P2P function), download speed was instant and every video played just fine. If this works for you, this might be the solution! Ressource usage was standard - app memory at 512mb and redis at 150mb. No other changes made.

                          girishG tshirt-chihuahuT 2 Replies Last reply
                          3
                          • subvenS subven

                            @subven said in Unusably Slow Playback on Peertube??:

                            Download speed is around 51-61KB and it does not play play well at all (30 second 18mb file).

                            Got it working on the Cloudron demo instance! Go into file manager and edit production.yaml. This is what I changed:

                            - line 123 --> accept_from: 'nobody'
                            - line 201 --> enabled: false
                            - line 238 --> enabled: false

                            line 130:

                            tracker:
                              # If you disable the tracker, you disable the P2P aspect of PeerTube
                              enabled: false
                            

                            After disabling the tracker (and peertubes P2P function), download speed was instant and every video played just fine. If this works for you, this might be the solution! Ressource usage was standard - app memory at 512mb and redis at 150mb. No other changes made.

                            girishG Offline
                            girishG Offline
                            girish
                            Staff
                            wrote on last edited by
                            #12

                            @subven Ah, good find. I had no idea P2P aspect could be disabled!

                            subvenS 1 Reply Last reply
                            2
                            • girishG girish

                              @subven Ah, good find. I had no idea P2P aspect could be disabled!

                              subvenS Offline
                              subvenS Offline
                              subven
                              wrote on last edited by
                              #13

                              @girish I think disabling P2P should be the standard for new Cloudron installations. Could save you lots of trouble and federation publication is off by default too.

                              tshirt-chihuahuT 1 Reply Last reply
                              3
                              • subvenS subven

                                @subven said in Unusably Slow Playback on Peertube??:

                                Download speed is around 51-61KB and it does not play play well at all (30 second 18mb file).

                                Got it working on the Cloudron demo instance! Go into file manager and edit production.yaml. This is what I changed:

                                - line 123 --> accept_from: 'nobody'
                                - line 201 --> enabled: false
                                - line 238 --> enabled: false

                                line 130:

                                tracker:
                                  # If you disable the tracker, you disable the P2P aspect of PeerTube
                                  enabled: false
                                

                                After disabling the tracker (and peertubes P2P function), download speed was instant and every video played just fine. If this works for you, this might be the solution! Ressource usage was standard - app memory at 512mb and redis at 150mb. No other changes made.

                                tshirt-chihuahuT Offline
                                tshirt-chihuahuT Offline
                                tshirt-chihuahu
                                wrote on last edited by
                                #14

                                @subven 🔥 🔥 🔥 🔥 it worked! My test video plays instantly and smoothly now!

                                🤦 face palm on my part for not looking directly for a config file to turn off federation....

                                Thanks for the lift @subven This came up big!

                                1 Reply Last reply
                                4
                                • nebulonN nebulon marked this topic as a question on
                                • nebulonN nebulon has marked this topic as solved on
                                • subvenS subven

                                  @girish I think disabling P2P should be the standard for new Cloudron installations. Could save you lots of trouble and federation publication is off by default too.

                                  tshirt-chihuahuT Offline
                                  tshirt-chihuahuT Offline
                                  tshirt-chihuahu
                                  wrote on last edited by
                                  #15

                                  @subven @girish An alternative suggestion to disabling by default: calling this setting out in the cloudron app documentation. (🤔 I'm kind of surprised this hadn't come up in the forum yet.)

                                  1 Reply Last reply
                                  1
                                  • jdaviescoatesJ Offline
                                    jdaviescoatesJ Offline
                                    jdaviescoates
                                    wrote on last edited by
                                    #16

                                    Hmm, interesting, I don't think I ever edited any config to turn any p2p or federation stuff off.

                                    I use Cloudron with Gandi & Hetzner

                                    1 Reply Last reply
                                    0
                                    • girishG Offline
                                      girishG Offline
                                      girish
                                      Staff
                                      wrote on last edited by
                                      #17

                                      Thing is we don't generally touch upstream defaults - https://github.com/Chocobozzz/PeerTube/blob/develop/config/default.yaml#L282 and https://github.com/Chocobozzz/PeerTube/blob/develop/config/production.yaml.example#L280 .

                                      I will put this in our docs.

                                      subvenS 1 Reply Last reply
                                      2
                                      • girishG Offline
                                        girishG Offline
                                        girish
                                        Staff
                                        wrote on last edited by
                                        #18

                                        Added a note in https://docs.cloudron.io/apps/peertube/#disable-p2p

                                        1 Reply Last reply
                                        1
                                        • girishG girish

                                          Thing is we don't generally touch upstream defaults - https://github.com/Chocobozzz/PeerTube/blob/develop/config/default.yaml#L282 and https://github.com/Chocobozzz/PeerTube/blob/develop/config/production.yaml.example#L280 .

                                          I will put this in our docs.

                                          subvenS Offline
                                          subvenS Offline
                                          subven
                                          wrote on last edited by subven
                                          #19

                                          @girish said in Unusably Slow Playback on Peertube??:

                                          Thing is we don't generally touch upstream defaults

                                          Thats a fair position. Though, I have installed a fresh peertube on my private Cloudron server, gave it enough ressources and was able to reproduce the problem. Normal playback is not possible out of the box and the P2P Webtorrent functionality seems to be the culpid. P2P works within your browser and my public (client/browser) IP is displayed correctly but I still think it has something to do with the way Cloudrons setup works.

                                          Since I as a user assume that every app in the Cloudron store works without further configuration, I see a problem here. I wonder why this wasn't noticed earlier, since the P2P defaults have been in peertube for over 3 1/2 years and the app is not new at Cloudron. To make my point: Just because it works upstream as a default, does not necessarily mean it works for us ^^

                                          jdaviescoatesJ 1 Reply Last reply
                                          0
                                          • subvenS subven

                                            @girish said in Unusably Slow Playback on Peertube??:

                                            Thing is we don't generally touch upstream defaults

                                            Thats a fair position. Though, I have installed a fresh peertube on my private Cloudron server, gave it enough ressources and was able to reproduce the problem. Normal playback is not possible out of the box and the P2P Webtorrent functionality seems to be the culpid. P2P works within your browser and my public (client/browser) IP is displayed correctly but I still think it has something to do with the way Cloudrons setup works.

                                            Since I as a user assume that every app in the Cloudron store works without further configuration, I see a problem here. I wonder why this wasn't noticed earlier, since the P2P defaults have been in peertube for over 3 1/2 years and the app is not new at Cloudron. To make my point: Just because it works upstream as a default, does not necessarily mean it works for us ^^

                                            jdaviescoatesJ Offline
                                            jdaviescoatesJ Offline
                                            jdaviescoates
                                            wrote on last edited by
                                            #20

                                            @subven said in Unusably Slow Playback on Peertube??:

                                            @girish said in Unusably Slow Playback on Peertube??:

                                            Thing is we don't generally touch upstream defaults

                                            Thats a fair position. Though, I have installed a fresh peertube on my private Cloudron server, gave it enough ressources and was able to reproduce the problem. Normal playback is not possible out of the box and the P2P functionality seems to be the culpid. P2P works within your browser and my public (client/browser) IP is displayed correctly but I still think it has something to do with the way Cloudrons setup works.

                                            Since I as a user assume that every app in the Cloudron store works without further configuration, I see a problem here. I wonder why this wasn't noticed earlier, since the P2P defaults have been in peertube for over 3 1/2 years and the app is not new at Cloudron. To make my point: Just because it works upstream as a default, does not necessarily mean it works for us ^^

                                            I wonder why I haven't hit this issue then? Pretty sure I've not done anything to turn P2P stuff off on https://video.uniteddiversity.coop

                                            I use Cloudron with Gandi & Hetzner

                                            subvenS 1 Reply Last reply
                                            1
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes


                                              • Login

                                              • Don't have an account? Register

                                              • Login or register to search.
                                              • First post
                                                Last post
                                              0
                                              • Categories
                                              • Recent
                                              • Tags
                                              • Popular
                                              • Bookmarks
                                              • Search