Constant access to the same file over and over again?

I know that I keep asking questions about the same buffer to ram thing that rclone does.

But I’m trying to play a UHD BD using Jriver in Windows 10.
Using Jriver it takes forever to open the first menu because it keeps reading the same files again and again.

While if I use the oppo 203 blu-ray player it opens almost instantly.

Here’s how jriver is accessing the files:
https://pastebin.com/uT0n2TZ8

I’ve tried setting buffer to 1G, --max-read-ahead 512M something to keep those small files into memory but it seems it keeps accessing it from gdrive.
If I could get this running it would be really sweet because jriver is the only windows app that can actually play full UHD BD.

max-read-ahead does nothing unless you are using a custom compiled kernel to over those defaults.

buffer-size is used when a file is read and kept open. Once the file is closed, the buffer is dropped so making it 1G actually makes it much worse in this case it tries to read ahead to fill the buffer and closes and it dumping the buffer.

The problem / challenge / issue is that JRiver constantly opens and closes the file, while this is fine when storage is local, when you use cloud, you have that inherent latency.

It opened up and closed the file 219 times in that small log you posted:

 grep "OpenFile: flags=O_RDONLY" uT0n2TZ8.txt  | wc -l
     219

rclone mount does well at reading sequentially but since you are repeatedly opening and closing it, there isn’t a setting you can do to tune that.

You can try using the cache backend to see if that helps as that stores chunks locally and may make it tolerable, but not sure either as that is one open/close happy application.

@Animosity022 hat’s just a portion of the paste I did there, it keeps doing that again and again.

The cache backend you mention is creating a cache remote? or can this be done with rclone mount?

something like rclone mount secure: q: --cache-dir c:\cache ?

Also do you mind if I point the jriver devs to this thread?

The cache backend has walkthrough steps here:

https://rclone.org/cache/

Sure. It’s similar to any Plex client that doesn’t quite behave well in terms of rapidly opening/closing files.

@Animosity022 it worked!! much faster!!

so I’m going to try this with my unraid box now but is there a way to tell rclone where to cache the files to?

In windows I mounted like this rclone mount --allow-other cache: q: and it worked!
Would --dir-cache /media/cache be the right way to point the directory?

Also all those --buffer-size etc, applies to a cache mount?

You got:

https://rclone.org/cache/#cache-chunk-path which is where chunks are stored which is what I think you want.

–buffer-size should be 0M for cache as it does its own memory thing.

man, seriously, thank you! Configured it within my unraid box and it’s working wonderfully.

I need to get back locally to my box to test it out but having the option to play full blu-rays from the cloud is just amazing.

Thanks animosity.

Nice! Happy that worked as I wasn’t sure if that would mitigate the issue enough but sounds like it did.

1 Like

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