Memory issue using rclone mount with Plex

What is the problem you are having with rclone?

I am running an rclone mount on my Raspberry Pi4 4gig (Ubuntu 20.04) and I am finding that when I do a Plex media scan on my TV shows, the memory usage gradually increases until either Fuse crashes or the entire OS crashes.

I'm fairly sure that I just need to tweak my script as it's probably just the buffer being too large, however before starting to tinker with the script (that works perfectly on my remote server, albeit with significantly more memory at it's disposal) I thought I would ask the experts, in case there is something else I should be addressing.

What is your rclone version (output from rclone version)

rclone v1.51.0-305-g0ce662fa-beta

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Ubuntu Linux 20.04 / Linux 5.4.0-1008-raspi on aarch64

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

    Description=PlexMount Service

    ExecStart=/usr/bin/rclone mount "RichFlixCrypt:/Encrypted/" /home/craftyclown/Skull \
       --allow-other \
       --buffer-size 256M \
       --dir-cache-time 72h \
       --drive-chunk-size 32M \
       --log-level INFO \
       --log-file /home/craftyclown/logs/rclone.log \
       --umask 002 \
       --vfs-read-chunk-size 128M \
       --vfs-read-chunk-size-limit off \
       --tpslimit 3   
    ExecStop=/bin/fusermount -uz /home/craftyclown/Skull


A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

Sorry I currently have no logs as the last crash caused all sorts of issues in the OS and necessitated a re-install, which is still under way.

This means every open file will use this much RAM which sounds like a lot for a 4GB raspberry Pi. I suggest you reduce that number.

1 Like

Thanks Nick,

I thought that was probably the case. Would something like 32M be more reasonable on a 4gig device and would that ultimately result in a performance trade off?

Other than the oversized buffer, is there anything else you might suggest tweaking on this script, for better performance on the Raspberry Pi?

That is the main one to tweak - I'd experiment to see what the lowest value you can get away with is.

1 Like

Thanks Nick, I'll have a little play

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