How to test --vfs-read-ahead?

Is there a way to test that --vfs-read-ahead on a OneDrive mount actually reads the amount I have set and has stored it in cache?

If I look at the cached file, the file size shown is the total size of the file, however that's obviously not what's in my vfs-cache as the local free space is much less than the file size.

Is there any way to confirm X GB of the file have indeed been downloaded and waiting in cache?

Without knowing what command you are running, what version, etc, it's tough to answer.

It might be used.
It might not be used.
It could be different on your version.

Main reason we use the template :frowning:

Apologies, I didn't think the template applied as I was only after a test strategy and didn't think to link it to a specific problem.

However, here is the template below with all the relevant information:

What is the problem you are having with rclone?

The problem is video randomly freezing on high-bitrate media content from OneDrive. However, I am discussing this in another thread in this forum. Here I only want to ask about how to test that --vfs-read-ahead XG is actually working as expected, i.e. how can I tell that X GB has been read ahead.
The reason behind this is, if I know that --vfs-read-ahead is working as expected, it will guide my search for a solution elsewhere vs. if it's not working, which will guide me towards finding out why it is not working.

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

rclone v1.65.1
- os/version: ubuntu 22.04 (64 bit)
- os/kernel: 5.15.0-91-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.21.5
- go/linking: static
- go/tags: none

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


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

ExecStart=/usr/bin/rclone mount \
        --config=/home/dinosm/.config/rclone/rclone.conf \
        --vfs-cache-mode full \
        --vfs-cache-max-age 4h \
        --vfs-cache-max-size 10G \
        --vfs-fast-fingerprint \
        --tpslimit 3 \
        --tpslimit-burst 7 \
        --bwlimit-file off:35M \
        --vfs-refresh \
        --onedrive-delta \
        --vfs-read-ahead 8G \
        --allow-other \
        --user-agent "ISV||rclone/v1.65.1" \
        --log-file=/home/dinosm/log/rclone_mediaa.log \
        --log-level DEBUG \
        mediaa: /home/dinosm/media/MediaA

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

type = union
upstreams = onedrivem1enc: onedrivem2enc: mediaa1enc: mediaa2enc: mediaa3enc: mediaa4enc: mediaa5enc: mediaa6enc:
action_policy = lfs
create_policy = lfs
cache_time = 0

type = onedrive
client_id = XXX
client_secret = XXX
token = XXX
drive_id = XXX
drive_type = personal

type = crypt
remote = mediaa1:Stuff/
password = XXX
password2 = XXX

The remaining of the remotes that are included in the union have identical entries in the config file (minus client IDs and secrets).

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

Rclone debug log while playing a movie

That log has everything in the cache already so read ahead wouldn't do anything.

You can do something like grep the log for "present" and grep -v true and you get no hits.

Read ahead works as if you are reading a file sequentially, it'll continue to read ahead until the file is closed. If the file closed, it stops reading ahead. The logs do show that, but since everying is already cached, it would not since they are all present in the cache.

I see. So if i see a similar log with "present false", does it mean it is not finding the file in cache and reading ahead?

Not 100% because it has to keep the file open and be reading it sequentially.

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