New feature --buffer-size

I haven’t noticed that with my Samsung smart tv Plex app.

One thing I have noticed is that if I have the buffer size set when mounting and then trying to scan a new Plex library with hundreds (or more) of entries that the mount will drop after 30 minutes or so. Turning off the buffer-size setting, remounting, and rescanning the library fixes the issue every time.

default buffer size is 16M if you dont set it to 0, so maybe try with default one that was there before ncw added flag.

Are you using fuse? Which -buffer-size are you setting?

I am using fuse, but not for Plex. I actually point Plex directly to my mount (~/ENCRYPTED).
unionfs-fuse -o cow ~/LOCAL=RW:~/ENCRYPTED=RO ~/ALL

I turned off -buffer-size for now while I do some Plex library import & cleanup, but I was using it at 500M for the last few days. I have noticed that it can take 10-45 seconds to start playing, but I’ve had that issue regardless of the buffer-size settings.

It looks like I’m on Tizen v2.4.0 and Plex v3.0.6(2.10.8) if that helps.

I did some tests last night and setting --buffer-size I could not start any video from the plex for samsung smart TV. I’ve tried with and without fuse.
removing --buffer-size and setting the transcoding no problem. in 10 seconds the video starts.
i’m on ovh server (ubuntu) and no problem with my network speed (1Gbps/200 Mbps)

Your server is on your lan?

Nope. Linode in the US.

Ok thanks…with ps4 plex app no problem.
I’ll try other settings with smart tv.

I didn’t have good luck with Linode. Performance was bad.

Sounds like a reasonable idea… Can you put in an issue?

Thanks

Done: https://github.com/ncw/rclone/issues/1171

I solve my problem with samsung smart tv. I notice that i have problem only with 2015 model (j series).
This model is not on tizen os so i haven’t the official app.
Contacting orca (the developer) i found an option that enable the secure connection. Enabling this option i solved my problem.

since i started using buffer size the rclone mount often gets disconnected (input/output error) because “too many files” were open. i stopped having these problems when i reduced the buffer from 1G to the default of 16M. i also removed --acd-templink-threshold 0 to be sure but i had been using that option for a long time without issues so the culprit must have been buffer size of 1G.

So my question is, how does this feature affect non-streaming use cases? for instance, if i use an application like filebot to rename all my media, it will compute the hash, check its mediainfo and it will keep all files open. will rclone try to buffer 1 gigabyte for each open file if i set my buffer to 1G? similarly with plex or sonarr scans.

i am using a rclone mount with buffer-size as well as bwlimit set.

as far as i can tell by looking at the used bandwith and the source code, the bwlimit is only enforced at the reading side, not the async receiver in rclone, thus the buffer is always filled with full speed.

With several consecutive seeks (happens with plex android client) this results in a very high bandwidth usage, way higher then the set bwlimit.

ist this intentional or a bug?

Afaik bwlimit does not work on rclone mount, it is intended for copy, sync, move.

bwlimit works on mounts, just not when filling the “buffer-size”

OMG, the buffer size feature is amazing.
Brilliant work!

1 Like

Thanks for sharing this @Ajki. When running this script it shows the correct CPU usage but shows 0 memory being used. I am using mount with flag --buffer-size=1G. I am on a managed VPS so don’t have root or sudo privileges. Do you think rclone is unable to use memory under these circumstances? How can I tell where rclone is buffering to?