Very slow google drive mount in linux; impossible to stream music or video

Arch Linux user here with a Debian home server. My current setup involves a Raid 5 volume, local sharing using nfs and accessing my data from outside using sshfs/sftp. The files consist mainly of audio (FLAC and mp3), video and comics. Everything works fine.

In the future, I want to move most of my files to cloud storage providers for different reasons and stream to my devices. Right now I am looking for a decent solution and found rclone in combination with google drive. This is my config using rclone v1.50.2 on my Arch machine

[gdrive]
type = drive
client_id = **
client_secret = **
scope = drive
token = **
root_folder_id = **

[gcrypt]
type = crypt
remote = gdrive:media
filename_encryption = standard
directory_name_encryption = true
password = **
password2 = **

and this is the mount command I use (basically copied from https://github.com/animosity22/homescripts)

rclone mount gcrypt: gdrive --allow-other --buffer-size 256M --dir-cache-time 1000h --log-level DEBUG --log-file ~/rclone.log --poll-interval 15s --timeout 1h --umask 002

Accessing the files works as intended, but streaming music (especially FLAC, but also mp3) with Audacious or streaming videos (720p + 1080p) with VLC is basically not possible. I experience lots of buffering and stuttering. I never had these problems using sshfs/sftp with my current setup, even on slower internet connections. Am I doing something fundamentally wrong or is my goal simply not achievable with rclone and google drive? I also don't experience problems streaming directly to VLC for iOS using the integrated cloud service.

Missing a debug log to see what the issue is.

Here is a debug log

What's the actual file you were playing? It has a lot of open and close files in there, which is slow on cloud storage.

egrep 'O_RDONLY|Flush: err=' rclone.log |wc -l
52

If you plan to play music, seems like most players open and close a lot. You may want to use the cache backend.

The actual file is "David_Guetta/Nothing_But_the_Beat_Ultimate/01_-_David_Guetta_feat.Sia-_Titanium.flac". I opened the whole album in Audacious and played the first song. The problem remains when I play a single song.

I will test the cache option in the evening. This means I add an additional layer between the actual drive and the crypt, right?

That is correct.

Ok, I couldn't wait and tested the cache backend. It almost works, with buffering occuring only a few times. I will look into it myself, but do you have any recommendations for the settings?

I'd probably do smaller chunk sizes if you streaming music.

I don't use Google Drive for music, just Movies/TV.

You'd have to find the sweet spot based on what you are seeing so it's a bit of trial and error.

Thank you very much. You helped a lot.

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