Slow playback and buffering while Plex is scanning library


I'm using an encrypted rclone mount on Debian 9 on a AMD Phenom II X4 955 CPUI and 8GB of ram. The Linux server has a 1Gbit wired connection.

I'm running Plex Server on a Windows 10 with a Ryzen 2700 @ 4.1Ghz and 16GB ram. This machine is also used for playback. The mediaplayer is usually Kodi Dsplayer (Kodi 17.6 with native madvr support).
This machine is connected via wifi, wich is good for a constant 40MB/s.

While start times, playback and seeking is normally very good, it all goes to shit as soon as Plex starts a library scan.

Playback through Plex while scanning is also very slow to start and seek, but seems to not buffer when it get's going. I'm guessing this is because it's downloading a decent buffer before starting playback?
DIsregard this, plex playback is also buffering

I have tried countless mount settings for rclone, but none really seem to make a difference with my problems. Right now I'm just using --vfs-cache-mode writes --allow-other.

Any ideas where my bottleneck lies? I can check wifi, but it should be good enough.
The AMD cpu is getting old, but I never see all 4 cores under full load on it.

I can't find much about this problem on google, but then again most people use Plex as their media player.

I'll supply any logs that are needed.

Cheers and thanks. :slight_smile:

Edit: CPU load on Linux server is 2-10% and RAM usage 2-3GB while scanning and playing a 1080p file. Stll buffering.

Rclone version shows what?
Did you make your own client ID/API key?

Can you run the mount with -vv and --log-file rclone.log and recreate the issue?

Just upgraded from latest stable to beta to test: rclone v1.47.0-076-gda3b685c-beta

I have added my own ID/API key. Will double check values.

Paste here:

Couldn't use pastebin because of size restrictions. Even had to cut away much of the log.

Here i started scan, started playback, seeked until the buffering occured, stopped scan and normal palyback resumed.

Edit: The file I'm playing is Avengers Infinity War 2160p

What's your download speed?

rclone looks pretty happy as it's reading and doing what it is supposed to be doing.


Wifi limited to about 40MB/s.

Creating a new API now, but I'm guessing it the log would show errors if that was the problem?

Edit: It's the same after creating a new API and pasting it to rclone.conf

Edit 2: It seems to work much better in the Plex player. Could it be something with how Kodi DSPlayer / madvr processes playback?

What's your full mount command?

rclone mount gcrypt: /mnt/encrypt/ --vfs-cache-mode writes --allow-other

I've tried playing around with the vfs cache stuff, but it doesn't seem to help at all.

For example:

rclone mount gcrypt:encrypt /mnt/encrypt/ --allow-other --vfs-cache-mode writes --dir-cache-time 72h --drive-chunk-size 32M --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit off

I'm not going to promise this will help, but I found it to be sufficient on a 35TB library.

/usr/bin/rclone mount GCrypt: /mnt/GCrypt --allow-other --buffer-size 256M --dir-cache-time 12h --drive-chunk-size 128M --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit off --use-mmap --cache-db-purge

Worth a shot? My dir cache time was only 12h because I scanned the library every 6. I'm speaking in past tense because currently I've had an insane number of issues with database locks (unrelated to rclone) and I might be ditching Plex, but this mount command served me well for a while now.

Like you I too use my own client id and secret for oauth access into the drive.

I'll give it a go, thanks

I it helps you. I'm no rclone expert, I've just been able to wrangle it to my needs.

You don't paste it into the conf, you have to run rclone config to authorize the new key. You should see hits on the API.

That doesn't do anything if you aren't using the cache backend.

1 Like

I'll be removing this then. I WAS using the cache backend but it did not appear to help my API error count. This is detailed over on the Plex forums.

OK, I'll do everything through rclone config and check performance

API errors are normal and are just rate limiting. You can ignore them as benign errors.

I can verify this. I have a paid GSuite for Business, and I've asked them on the phone if there is any sort of ban, and there is not. They're just limiting you, but they'll never block your client. I specifically asked if it was okay to leave a recursive job continually hitting their API and they said that's totally fine to do.

939 API calls already on the new API key without errors, so I guess that is working

I seemed to have fixed the problem by moving Plex Server to the much weaker Debian machine...
It's not happy doing too much transcoding, but I'm using direct play 99% of the time.

@Animosity022, can you try to make sense why this would work better than having Plex running on a considerable faster Ryzen 2700? Having rclone and plex on different machines shouldn't matter.

I tried using an ethernet cable instead of wifi before moving Plex, but I had the same problems.

How would you have plex and rclone on different machines?

I run all in one in my setup so I have rclone/Sonarr/Radarr/Plex all on the same thing.

I run everything hard wired on gigabit ethernet at home and direct play/direct stream 99% of the time.

I thought it made sense to run Plex server on a much, much faster Ryzen 2700 compared to a 10 year old AMD Phenom. For myself with direct play, it doesn't matter, but I don't think it will hold up transcoding for the 2-3 buddies that use my Plex.