Saturate connection for Plex

I was wondering if there was a way to saturate my connection with multiple simultaneous downloads when using with Plex for faster seeks?

systemd file

ExecStart=/usr/bin/rclone mount \
        --config=/home/pi/.config/rclone/rclone.conf \
        --read-only \
        --allow-other \
        --buffer-size 256M \
        --dir-cache-time 1000h \
        --poll-interval 10s \
        --timeout 1h \
        -v --log-file /home/pi/media.log \
        --rc \
        media:/ /mnt/media
ExecStop=/bin/fusermount -uz /mnt/media


A mount works by reading a file that is requested.

You can read multiple files at a time, but the application has to request it.

Depending on what your bottleneck is or a bottleneck on Google's side, I can usually saturate my gigabit fios by reading about 5-6 files at a time without an issue.

Plex is just reading usually part a file at a time and if you have multiple streams, you'll see multiple downloads.

There are a number of factors on how it requests as if you are direct playing, it's more related to the buffer size in rclone so it'll request ahead for that.

If you are direct streaming / transcoding more, you'd want to tweak the transcode setting in Plex to be bigger.

I keep a balance between both as I primarily direct play everything at home, but my friends direct stream/transcode 90% of the time so it really depends.

Are you having a specific issue with Plex not working right?

It's more about how bad the ISP's WAN network gets during peak hours.

If I download a single file in 6 threads, speeds go up to 90Mb/s, if I download it in a a single thread, it will hit 30 if lucky.

So when Plex requests the playback of a file, could it be downloaded with multiple threads for the same file?

Do you mean 90MB/s or 90Mb/s?

There's no magic that really fixes if you WAN link is over saturated other than playing at lower bitrates.

The way plex works is it asks for the file. There is no concept of multi threaded or anything in Plex to do that. It asks rclone for data and rclone delivers it. It is also heavily dependent on the device playing, direct playing or transcoding and bottlenecks on the server as well.

There are quite the number of factors that go into playback.

In a perfect world, I'd probably want to have a mount with a disk based caching so I can keep files in a stage area that are being played and grab them while playback is going but it's tricky as there are a lot of factors that go into that to make it work without choking everything.

The cache backend does some of this but without a maintainer, it hasn't gotten any love in some time and needs some fixes to make it really useful for me.

Mb/s. Not everybody has a gigabit connection.

There is. Multi threaded streams. Saturates what’s left.

That’s what I’m asking. If I can utilize something like --multi-thread-streams [int], will that work?

You really want to limit the streams in Plex to something around your capacity. You can do that in the settings as it doesn't matter what my connection as I configure my streaming to match what the connection limitations are.

There is an old saying that you can't fit 20 lbs of stuff in a 10 lb bag so you have to work within the constraints given to you.

If a link has say 50Mb/s and it's saturated at 50Mb/s, adding more streams would make it worse since it is saturated. Are you meaning something else than 100% utilization as that's commonly what's referred to as a saturated link.

How? Plex is asking for sequential parts of a file and reading it and only reading what it's asking for. Breaking that up into bits and re-assembling it would make it far worse as it's sequential IO as you'd have to wait for that work to complete.

As I mentioned a bit earlier, it sounds like you want something like the cache backend to read ahead and keep things local if you run out of capacity but the problem still remains if a link is saturated and the player is playing more bitrate than the link can support, it would not ever catch up.

There is no question of multiple streams because I’m the sole user.

In my case, I have ~100Mb/s download bandwidth. Again, for single files I rarely hit 30-40 in peak hours. Other times, around 80-90.

Fair point. I’ll try it though and then revert if it fails to work.

What's the average bitrate of the content you are trying to play?

Oh! By that I meant, downloading a large file from Google Drive on the web.

I haven’t checked the server for the down speeds while streaming. Took longer than usual to Direct Play and buffer on my iPad last night, so I was concerned.

It is entirely possible that OP's ISP is throttling per-request capacity during peak use. Thus ~30Mb/s per "stream" (i.e. per request) but combined streams are closer to 100Mb/s max rate.

Not sure why whether OP meant megabit or megabyte per second is relevant, as long as it is consistent across measurements. (Although I do wish people would use Mb for megabit and MB for megabyte as designed so it would be consistent across different poster's comments. Hell, even Plex uses it incorrectly.)

More specifically to the original question, its not rclone have you (OP) experimented with cache vs. VFS? (I'm sure this will pique @Animosity022 interest given their other discussions on cache use vs VFS use.)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.