Rclone how to limit RAM usage

What is the problem you are having with rclone?

How do I limit the amount of RAM rclone uses or the objects in the RAM cache? Currently have an issue when I open up my torrent client it checks over 10000 torrents and I end up with over 30GB of RAM usage just on rclone process alone which maxes my available RAM.

Below log shows I have over a million files in my RAM:
2023/12/29 13:13:30 INFO : vfs cache: cleaned: objects 1380410 (was 1380410) in use 0, to upload 0, uploading 0, total size 0 (was 0)

Run the command 'rclone version' and share the full output of the command.

rclone v1.65.0

  • os/version: Microsoft Windows 10 Pro 22H2 (64 bit)
  • os/kernel: 10.0.19045.3803 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.21.4
  • go/linking: static
  • go/tags: cmount

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

Local

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

rclone mount Union: P: --vfs-cache-mode writes --cache-dir "E:\rclone cache" --vfs-fast-fingerprint --vfs-cache-max-size 1500G --dir-cache-time=5s --buffer-size 1G --network-mode --local-encoding "Slash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot" --log-level INFO

Change the way how you use your torrent client. If it is not needed to check all 100k torrents then configure it not to do it.

IMO this is not rclone mount problem but how you use it. rclone only tries to do what you request.

Atm rclone stores all dir cache in memory - there is no option to store it on disk.

What you can help with is to remove --buffer-size 1G - not sure why you set it so high given that as per docs:

The maximum memory used by rclone for buffering can be up to --buffer-size * open files.

If you are not sure what some flags are for it is much better to use defaults instead of some random values.

It seems --vfs-cache-max-size to 20G did the trick as it was actually uses the RAM.
While cache-dir is only used as an upload cache if --vfs-cache-mode writes is set

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