I tried multiple settings to mount and stream my music but none of them were good (minimum 5 seconds to start playing the music or skipping to the next songs).
After reading and trying some alternatives I found out that using Google-Drive-Ocalmfusr with the following settings resolved any playback issue:
As I said the playback performance is perfect but it seems to be a bit less stable than Rclone. So I wonder if someone could help me replicate those settings in an Rclone remote.
Any idea? @Animosity022 the values mentioned above one are the default ones + 3 values that you changed in some tests you made months ago
As I said it works perfectly for music (I don’t care about video as I have a different remote for that), but Rclone is more stable than Google drive ocalmfuse so I’d like to have the equivalent settings for rclone
Well every single rclone settings I tried doesn’t bring good results for music streaming… It takes several seconds to start playing or switching between songs.
With the Google ocalmfuse settings I posted in the OP the streaming is almost perfect, but Google ocalmfuse has some memory leaks from time to time that lead to a a huge ram usage… That’s why I would like to replicate those settings in rclone. Rclone seems a much more stable app
I have been trying to adapt your gmedia-reclone.service from your github to match what I posted in the OP but I still the scanning and playback performance is way worst than using the google-drive-ocamlfuse settings I posted in the OP (which were done folllowing some settings you used in a different thread).
I’m guessing that I just need to adapt the following google-drive-ocamlfuse settings to the rclone settings:
max_memory_cache_size=10000000000 #10GB max
memory_buffer_size=8388608 #8MB
read_ahead_buffers=5
stream_large_files=true
But I tried countless of different setups and I keep failing…
Would memory_buffer_size be the equivalent to rclone’s --vfs-read-chunk-size?
And is max_memory_cache_size the equivalent to rclone’s --buffer-size?
And this is the rclone debug log of what happened while I was playing music (I can upload the whole file if necessary, which also includes the scanning process):
Seems to be your player opens and closes the file repeatedly which causes the problem. What are you using to play the media?
2018/12/28 12:01:08 DEBUG : J. Rawls/Great Live Caper (Album)/06 Great Live Caper (Pt. 2) featuring J-Live (Clean).mp3: Open: flags=O_RDONLY
2018/12/28 12:01:09 DEBUG : &{J. Rawls/Great Live Caper (Album)/06 Great Live Caper (Pt. 2) featuring J-Live (Clean).mp3 (r)}: Flush:
2018/12/28 12:01:09 DEBUG : J. Rawls/Great Live Caper (Album)/06 Great Live Caper (Pt. 2) featuring J-Live (Clean).mp3: Open: flags=O_RDONLY
2018/12/28 12:01:09 DEBUG : &{J. Rawls/Great Live Caper (Album)/06 Great Live Caper (Pt. 2) featuring J-Live (Clean).mp3 (r)}: Flush:
2018/12/28 12:01:09 DEBUG : J. Rawls/Great Live Caper (Album)/06 Great Live Caper (Pt. 2) featuring J-Live (Clean).mp3: Open: flags=O_RDONLY
2018/12/28 12:01:19 DEBUG : &{J. Rawls/Great Live Caper (Album)/06 Great Live Caper (Pt. 2) featuring J-Live (Clean).mp3 (r)}: Flush:
2018/12/28 12:01:19 DEBUG : J. Rawls/Great Live Caper (Album)/06 Great Live Caper (Pt. 2) featuring J-Live (Clean).mp3: Open: flags=O_RDONLY
2018/12/28 12:01:27 DEBUG : &{J. Rawls/Great Live Caper (Album)/06 Great Live Caper (Pt. 2) featuring J-Live (Clean).mp3 (r)}: Flush:
2018/12/28 12:01:27 DEBUG : J. Rawls/Great Live Caper (Album)/06 Great Live Caper (Pt. 2) featuring J-Live (Clean).mp3: Open: flags=O_RDONLY
2018/12/28 12:01:29 DEBUG : &{J. Rawls/Great Live Caper (Album)/06 Great Live Caper (Pt. 2) featuring J-Live (Clean).mp3 (r)}: Flush:
2018/12/28 12:01:29 DEBUG : J. Rawls/Great Live Caper (Album)/06 Great Live Caper (Pt. 2) featuring J-Live (Clean).mp3: Open: flags=O_RDONLY
2018/12/28 12:01:30 DEBUG : &{J. Rawls/Great Live Caper (Album)/06 Great Live Caper (Pt. 2) featuring J-Live (Clean).mp3 (r)}: Flush:
2018/12/28 12:01:30 DEBUG : J. Rawls/Great Live Caper (Album)/07 Great Live Caper (Pt.2) (Instrumental).mp3: Open: flags=O_RDONLY
2018/12/28 12:01:31 DEBUG : &{J. Rawls/Great Live Caper (Album)/07 Great Live Caper (Pt.2) (Instrumental).mp3 (r)}: Flush:
2018/12/28 12:01:31 DEBUG : J. Rawls/Great Live Caper (Album)/07 Great Live Caper (Pt.2) (Instrumental).mp3: Open: flags=O_RDONLY
2018/12/28 12:01:31 DEBUG : &{J. Rawls/Great Live Caper (Album)/07 Great Live Caper (Pt.2) (Instrumental).mp3 (r)}: Flush:
2018/12/28 12:01:31 DEBUG : J. Rawls/Great Live Caper (Album)/07 Great Live Caper (Pt.2) (Instrumental).mp3: Open: flags=O_RDONLY
2018/12/28 12:01:48 DEBUG : &{J. Rawls/Great Live Caper (Album)/07 Great Live Caper (Pt.2) (Instrumental).mp3 (r)}: Flush:
2018/12/28 12:01:48 DEBUG : J. Rawls/Great Live Caper (Album)/07 Great Live Caper (Pt.2) (Instrumental).mp3: Open: flags=O_RDONLY
2018/12/28 12:01:48 DEBUG : &{J. Rawls/Great Live Caper (Album)/07 Great Live Caper (Pt.2) (Instrumental).mp3 (r)}: Flush:
2018/12/28 12:01:48 DEBUG : J. Rawls/Great Live Caper (Album)/07 Great Live Caper (Pt.2) (Instrumental).mp3: Open: flags=O_RDONLY
2018/12/28 12:01:49 DEBUG : &{J. Rawls/Great Live Caper (Album)/07 Great Live Caper (Pt.2) (Instrumental).mp3 (r)}: Flush:
2018/12/28 12:01:49 DEBUG : J. Rawls/Great Live Caper (Album)/07 Great Live Caper (Pt.2) (Instrumental).mp3: Open: flags=O_RDONLY
2018/12/28 12:01:50 DEBUG : &{J. Rawls/Great Live Caper (Album)/07 Great Live Caper (Pt.2) (Instrumental).mp3 (r)}: Flush:
You can see it repeatedly opens and closes the file which is the root cause of the slowness. Cache backend might provide some benefit but not sure as I don’t use it.
With google-drive-ocamlfuse (settings from OP) everything plays perfectly and the scanning is also at least 5x faster, but as I mentioned it’s less stable, uses more RAM and folders are not accesible by certain programs…
ocamlfuse uses memory to store chunks like the cache backend so it’s comparing apples to an orange.
You aren’t going to find a vfs setting to fix the problem as the problem is the way Plex is doing the open/closes and that adds latency, which is what you are seeing.
WOW. I just added a cache remote to my gmedia-reclone.service and got Plex scanning from the cache remote directly instead of from gmedia-reclone.service.
The playback now is perfect! The scanning is still quite slow though but maybe that can't be improved further.
Just to recap:
Section of my rclone.conf related to my music files:
[Unit]
Description=Juanmartin music Daemon
After=multi-user.target
@Animosity022 the playback is perfect now, would you do something else to improve the scan speed?
PS: I noticed that the gmedia remote of the rclone.conf from your github mentions a remote called gcache: But there is not any gcache: remote in your rclone.conf