Rclone absorbing all the ram

With my server rclone will use all the available ram until the server runs out of memory. Is it possible to make it so that rclone cant use more than 65% total memory and deletes the oldest file it has downloaded once it reaches that?

What version of rclone are you using?
What command are you using to mount it?

Basically, try to answer the stuff in the question so we can help you faster.

1 Like

rclone mount --allow-other --bind 2a01:8740:1:fd0d::3 --log-file /opt/rclone/logs/mlibrarygdriverclone1.log -v --dir-cache-time 24h --vfs-cache-max-age 12h --vfs-read-chunk-size 32M --buffer-size 500M --timeout 1h gdrive1: /gdrives/GD_1 --user-agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36': &

Latest version

You are using 500MB of ram per file opened.

Also, latest version doesn't show much. Try to just run rclone version and share that as it shows your version.

rclone v1.51.0

  • os/arch: linux/amd64
  • go version: go1.13.7

What size buffer would you recommend?

How much memory on your machine? How many files on average do you have opened up at a time? Buffer helps if a file stays open. Once a file closes, the buffer is dropped. I'd usually leave it at the default unless you have a lot of spare memory or want to use a little more.

32gb. How much is included by default? Average of 10 streams on a busy evening.

Eventually rclone will consume all the ram untill the oom killer kills the emby process.
Looking at the memory utilisation it doesn't look like any memory is released when I finish watching something?

rclone only uses as much memory as you have open files * buffer size and a little more for directory caching.

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