Rclone mount extremely slow at accessing files

I’ve been using clone mount to mount gdrive to local dir and I experience extreme lag when accessing files or drag and drop them around. It almost feels like the nothing is mounted locally and that every operation has to fetch or push files directly from the web.

I mount things using the following command:

rclone mount gdrive: ~/gdrive_local --vfs-cache-mode full

Anyone observing the same problems?

A simple cp command transferring a bunch of pdfs from the mount directory into a local dir takes 5 min.

time cp gdrive_john/Interpretability/Nips2017/Interpretable-Models/Workshop/* GoogleDrive/papers/pdfs/

real	0m7.481s
user	0m0.001s
sys	0m0.155s

It does that as you have “–vfs-cache-mode full” so that means it fully downloads the file on every operation.

Do you know why you added the cache mode full?

I remember reading in the docs that is required in order to have full read/write access to the files. Basically I mount gdrive locally open a pdf, edit it locally, save and things should be updated on gdrive via rclone?

So my use case is definitely different from yours as I’m streaming media.

In that case, you might be able to get away with just ‘writes’ as opposed to full. If you use full, it will download a file completely if you even do a read operation. If you post a bit more of your use case and what you are trying to accomplish, I’m sure some other folks will chime in with suggestions on that use case.

Sure thing. My use case is the following I have a bunch of files in gdrive and I want to mount to local dir and have full access to them read/write. Because sometimes you cant infer from the file name, you need to read the titles, after that maybe make some changes in the files probably add some annotations, save the files and have then sync.

Why doesn’t it do that once when you mount the directories and keep doing it on every operation. Shouldn’t it be downloading them once and only trigger a sync if the file has changed?

It will download it once when you first open it, then keep it on disk until it expires.

Thanks for the reply. Still don’t understand why it takes 7min to copy 10 pdfs from the mount dir to another local dir, shouldn’t that be as fast as copying the same amount of files between 2 local dirs?

If you copy the directory again it should be very quick.

Note the default time for keeping things in the cache is 1h set with --vfs-cache-max-age

Thanks! Am I using the correct commands to optimize for mounting? or am I missing some other switch?

BTW can we use sshfs to mount to google drive?

Try –vfs-cache-mode sites would be my advice.

Note that rclone copy will copy files much quicker than using cp from rclone mount as it can copy files in parallel.

Do you mean mount the rclone mount with sshfs? I think that will work.

–vfs-cache-mode writes


1 Like

Apologies my mistake of not explaining better. I don’t know the internals of rclone, but from looking around it seems that most tools rely on FUSE and I was wondering since sshfs supports FUSE if one could mount directly just using sshfs and not rclone to google drive?

sshfs doesn’t support mounting google drive directly. You have to a have a file system mounted to use sshfs.

1 Like