How To Speed Up Google Drive OCamlFUSE (Tool To Mount Google Drive On Linux)
Google Drive OCamlFUSE lets you mount Google Drive on Linux, with no dependencies to any desktop environment. Using it, you get full read and write access to ordinary files and folders, read-only access to Google Docs, Sheets, and Slides, and more. It also supports multiple accounts and Team Drive.
Thanks to this tool, you can access Google Drive on Linux from your file manager, open files from Google Drive from desktop applications, and even access Google Drive files from a terminal.
For some users though, even navigating their Google Drive is very slow using Google Drive OCamlFUSE. This article contains a few tweaks for speeding up Google Drive access when mounted on Linux using Google Drive OCamlFUSE, so you can browse and perform file operations (rename, move, open) faster. This won't make Google Drive OCamlFUSE upload or download files faster though.
1. Speed up Google Drive OCamlFUSE when having a lot of Google Docs, Sheets and Slides in your Google Drive
Google Docs, Sheets and Slides cannot be cached efficiently, so if you have a lot of these types of files, your Google Drive may be slow to navigate, opening, moving or renaming files, etc. In fact this is the number 1 reason why Google Drive OCamlFUSE might be slow for you.
- If you don't need to access these Google documents, you can completely turn them off in Google Drive OCamlFUSE, which should make browsing and accessing files a lot faster. This can be done by editing the Google Drive OCamlFUSE configuration file and replacing
download_docs=true
withdownload_docs=false
.
By default, the configuration file path is
~/.gdfuse/default/config
. Open this file with your default text editor by using:xdg-open ~/.gdfuse/default/config
Search for
download_docs
, set its value to false (it's set to true by default), and save the file.- In case you do want to be able to access Google Docs, Sheets and Slides on the desktop, but want to increase the Google Drive OCamlFUSE performance in the same time, you have another option. You can turn Google Docs into links. This can be done by having
document_format=desktop
,presentation_format=desktop
, and so on, in the Google Drive OCamlFUSE configuration file.
In fact, starting with version 0.7.5 of Google Drive OCamlFUSE, released about 10 days ago, this is now default. But if you already had Google Drive OCamlFUSE installed and configured, these settings won't change unless you do it manually.
To turn Google Docs into links, open the Google Drive OCamlFUSE configuration file (
~/.gdfuse/default/config
) using your default text editor by using this command:xdg-open ~/.gdfuse/default/config
Now search for all occurrences of
_format=
in this file (document_format=
, presentation_format=
, etc.), and change their value to desktop
, e.g. document_format=desktop
, presentation_format=desktop
, and so on, and save the file.You'll then have to run google-drive-ocamlfuse with the
-cc
option once, to clear the cache:google-drive-ocamlfuse -cc
Related: Mounting Google Drive On Xfce Or MATE Desktops (Ubuntu, Linux Mint)
2. Speed up Google Drive OCamlFUSE by increasing the
metadata_cache_time
value.The
metadata_cache_time
option specifies the interval in seconds between queries to detect server-side changes on your Google Drive, and its default value is 60 seconds.If you do a lot of local changes, and you don't need to check your Google Drive for changes frequently (so there aren't others constantly making changes to your Google Drive files), you can increase this value to boost the speed at which you can access folders, files, and perform file operations on Google Drive mounted using Google Drive OCamlFUSE.
Open the Google Drive OCamlFUSE configuration file (
~/.gdfuse/default/config
) with your default text editor using:xdg-open ~/.gdfuse/default/config
Now search for
metadata_cache_time
, and change its value from 60 to 600. I recommend trying it with 600 at first, but you may use even higher values if you wish, especially if you're sure you make all the changes to your Google Drive locally.Related: Cli Google Drive Client Grive2: How To Enable Automatic Synchronization
3. Increase the maximum cache size
Google Drive OCamlFUSE can cache files locally, so after the initial load it's a lot faster. The maximum cache size is set to 512 MB by default, but if you have plenty of local space, you can increase this to speed things up.
Once again open the Google Drive OCamlFUSE configuration file (
~/.gdfuse/default/config
) with your default text editor using:xdg-open ~/.gdfuse/default/config
Search for
max_cache_size_mb
, and change its value from the default 512 MB, to a value that you want, and save the file.If you're new to Google Drive OCamlFUSE, see how to install and use it on its GitHub repository page.