Best configuration for a speedy Gdrive experience on Linux

What is the problem you are having with rclone?

Hello, my problem is speed on Linux while accessing folders and files.
When I accessed my G-drive from Linux it took a lot of time to load content so I've tried to improve everything by myself (like persistent cache), and I succeeded with some extent but I would like some help and advises from this community.

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

rclone version
rclone v1.68.1

  • os/version: debian trixie/sid (64 bit)
  • os/kernel: 6.11.3.1-acer-nitro5 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.23.1
  • go/linking: static
  • go/tags: none

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

Google Drive with a 100GB subscription.

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

/usr/bin/rclone mount -vv --config=/home/valerio/.config/rclone/rclone.conf --vfs-cache-mode full --vfs-cache-max-age 60w --vfs-cache-max-size 13G gdrive-passini:MyPC /home/valerio/.gdrive/

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

$ clone config redacted
[Gdrive1]
type = drive
scope = drive
token = XXX
team_drive =
client_id = XXX
client_secret = XXX
root_folder_id = XXX

A log from the command that you were trying to run with the -vv flag

024/10/13 19:38:56 DEBUG : rclone: Version "v1.68.1" starting with parameters ["/usr/bin/rclone" "mount" "-vv" "--config=/home/valerio/.config/rclone/rclone.conf" "--vfs-cache-mode" "full" "--vfs-cache-max-age" "60w" "--vfs-cache-max-size" "13G" "Gdrive1:MyPC" "/home/valerio/.gdrive/"]
2024/10/13 19:38:56 DEBUG : Creating backend with remote "Gdrive1:MyPC"
2024/10/13 19:38:56 DEBUG : Using config file from "/home/valerio/.config/rclone/rclone.conf"
2024/10/13 19:38:57 DEBUG : vfs cache: root is "/home/valerio/.cache/rclone"
2024/10/13 19:38:57 DEBUG : vfs cache: data root is "/home/valerio/.cache/rclone/vfs/Gdrive1/MyPC"
2024/10/13 19:38:57 DEBUG : vfs cache: metadata root is "/home/valerio/.cache/rclone/vfsMeta/Gdrive1/MyPC"
2024/10/13 19:38:57 DEBUG : Creating backend with remote ":local,encoding='Slash,Dot':/home/valerio/.cache/rclone/vfs/Gdrive1/MyPC"
2024/10/13 19:38:57 DEBUG : :local: detected overridden config - adding "{bxYPm}" suffix to name
2024/10/13 19:38:57 DEBUG : fs cache: renaming cache item ":local,encoding='Slash,Dot':/home/valerio/.cache/rclone/vfs/Gdrive1/MyPC" to be canonical
":local{bxYPm}:/home/valerio/.cache/rclone/vfs/Gdrive1/MyPC"
2024/10/13 19:38:57 DEBUG : Creating backend with remote ":local,encoding='Slash,Dot':/home/valerio/.cache/rclone/vfsMeta/Gdrive1/MyPC"
2024/10/13 19:38:57 DEBUG : :local: detected overridden config - adding "{bxYPm}" suffix to name
2024/10/13 19:38:57 DEBUG : fs cache: renaming cache item ":local,encoding='Slash,Dot':/home/valerio/.cache/rclone/vfsMeta/Gdrive1/MyPC" to be canonical ":local{bxYPm}:/home/valerio/.cache/rclone/vfsMeta/Gdrive1/MyPC"
2024/10/13 19:38:57 DEBUG : vfs cache RemoveNotInUse (maxAge=36288000000000000, emptyOnly=false): item Documents/Biblioteca/fotografia/EOSDR300DIM-E
N.PDF not removed, freed 0 bytes
s [...]

Remote config looks perfect with client_id configured.

To speed up access to drive mount content pre-load directories cache by adding --vfs-refresh flag. Please note that you will see improvement only few minutes (?) after you start your mount - when initial cache refresh is finished (it happens in the background). Unfortunately this cache is not persistent (yet) so every time mount is started it has to be repopulated.

In addition given that drive is a polling remote you can safely extend --dir-cache-time avoiding frequent remote checks.

All together:

rclone mount --vfs-refresh --dir-cache-time 60w --vfs-cache-mode full --vfs-cache-max-age 60w --vfs-cache-max-size 13G Gdrive1:MyPC /home/valerio/.gdrive/

This should make usage noticeably smoother.

Check also fingeprinting docs section and maybe add --vfs-fast-fingerprint

Now all will be up to your network speed and Google's whim.

1 Like

Thank you for your hints, do you know if the debug messages slow down rclone performances? Are they necessary?

They should not slow down anything. Only really needed when troubleshooting some problems (this is what any DEBUG is for). Myself I never use them in normal operations.

1 Like

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