Rclone mount vs inotifywait for upload?

Which is more efficient in terms of automating upload upon file write to directory:

  1. rclone mount

  2. inotifywait + rclone move per file write

Is there a significant difference in terms of cpu and memory usage a) during transfer and b) during idle times?

It depends on what you mean by efficient.

rclone mount is easier to use since it's just a mount and it uploads.

Sorry, I mean in terms of cpu and memory usage? Say if a script employs 'inotifywait' to efficiently wait for a file to get written to a directory, and then launches 'rclone move' to upload the file, and repeats for the next file, how will this compare with the use of 'rclone mount' running in the background and uploading files as they are written to the directory instead? I mean is the 'rclone mount' implementation fairly efficient in terms of avoiding unecessary polling, etc.?

I imagine 'rclone mount' incurs a performance penalty(?).

On the other hand, I wonder if repeated 'rclone move' commands would result in some unecessary processing associated with re-establishing the connection from scratch every time, which 'rclone mount' can avoid?

Would be interested to know your thoughts.

I don't know:

  • What OS you are talking about
  • What backend you are talking about

Best to really use the template as it collects a lot of information and yet people still delete it which baffles me.

Unless you are running on a very old, ancient device, it wouldn't make much difference. I'd focus on ease of use rather than a very minor difference in terms of a 1-2% of CPU.

Yes sorry it is plain laziness. Shortcut that fails and makes things take longer. Next time I will use the template.

Device is:

This is OneDrive using:

rclone mount "OneDrive:/Scanned Documents/" /tmp/OneDrive/ --cache-dir /tmp --vfs-cache-mode writes --umask 000 --allow-other --daemon

And rclone v1.52.2_2020-06-24 (the latest available for OpenWrt - I am going to ask the maintainer to update!).

Does your advice still apply? Certainly easier from scripting perspective just to use the mount.

You'd probably want to test it out and see how things work.

That's a really under powered, low memory device.

You probably want to reduce everything since you have very limited memory:

      --use-mmap                             Use mmap allocator (see docs).
     --buffer-size SizeSuffix               In memory buffer size when reading files for each --transfer. (default 16Mi)

Perhaps move that to 1M.

Default chunk size for uploading to onedrive is 10MB.

https://rclone.org/onedrive/#onedrive-chunk-size

You'd want to make sure you aren't uploading too many things at once.

1 Like

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