Testing for new vfs cache mode features

Ok Use this comand:
rclone mount team1pruebacachevfs:/ /home/ubuntu/team1pruebacache2/ --allow-other --vfs-read-ahead 5G --vfs-cache-me full

type = drive
client_id = *******
client_secret = *******
scope = drive
root_folder_id = *******
token = *****
team_drive = ********

it works , I have a bandwidth meter to show if ubuntu is downloading or not.
I am testing this:
1.- I click play and film start, bandwidth start 15MB
2.- I click stop play and bandwidth bo to 0, CORRECT.
3.- I click again play and fil start and bandwidth start 15MB CORRECT
4.- Film I think is downloading on cache because the space on my sd.

I see 2 folder:
/.cache/rclone/vfsMeta/team1pruebacachevfs/prueba -> size is 12 K
/.cache/rclone/vfs/team1pruebacachevfs/prueba -> size is 5.5G and increasing .......

But I see one strange thing.

Play film and I see this fil is downloading.
Now it has downloading...
I see the download on /.cache/rclone/vfs/team1pruebacachevfs/prueba is 42 GB
I go to minute 20 and it takes time to load.
If am on monute 30, and return to minute 1 the download of the film from internet stops and load from the cache only.
I dont know why the downloas speed is not constant... 13MB -- 1MB --- 7 MB --- 2 MB --- 12 MB----

I have open this same file on mobile and all cache stored on /.cache/rclone/vfs/team1pruebacachevfs/prueba was deleted!, I dont know why.... any idea???.

I will make more test and post it here.

Can I limit the cache stored on /.cache/rclone/vfs/team1pruebacachevfs/prueba ?? for example 20 GB.
And limit form example 5 hours?.

If my SD is full... what will happen????????.


You limit based on size as this is not chunks but sparse files. The file looks to take 10GB and if only uses a few MBs of the file, it only actually uses a few MBs. If you are streaming movie or tv, it would eventually have the whole file for a period of time as it's not like the cache backend which worked in chunks.

For limiting the size:

 --vfs-cache-max-age duration             Max age of objects in the cache. (default 1h0m0s)
 --vfs-cache-max-size SizeSuffix          Max total size of objects in the cache. (default off)

It would error out writing files and be generally bad.

It's best to make sure you have space and configure it properly.

Hello for example....
rclone mount team1pruebacache:/ /home/ubuntu/team1pruebacache/ --allow-other --vfs-read-ahead 5G -vfs-cache-mode full --vfs-cache-max-age 2D --vfs-cache-max-size 1G
?? its right?

And the --vfs-read-ahead 5G -> This 5G what does??

Lot Lot of thanks.

Ok it works fine but I see a little problem.

I moount with:

rclone mount team1pruebacachevfs:/ /home/ubuntu/team1pruebacache2/ --allow-other --vfs-read-ahead 5G --vfs-cache-mode full --vfs-cache-max-age 48h --vfs-cache-max-size 2G

I add on plex my folder, I go to :~/.cache/rclone/vfs/team1pruebacachevfs/prueba AND without playing anything the folder size is 31M, only with 2 films... I imagine is when plex index the files?, but... what happends when the original folder contain 1.000 archives?? I imagine the size will be big big big!!!!!.

Please keep in mind that this is still in beta so the docs for the various flags are spread across various posts in this thread and on the website. If you do want to try it out, make sure to go through this thread so you understand the various options and what they control.

This controls the maximum size of the cache. Irrespective of how many files are scanned, the cache will never grow beyond 2G (i.e 2 GB)

The vfs-cache-max-size should be set to at least the value of the vfs-read-ahead * number of files that you expect to be playing simultaneously. Setting it any lower won't be of any help and may even negatively impact the playback.

This controls how much rclone reads ahead and stores in the cache when a file is being read continuously from the mount.

Ok Ok, Excuse me please.

Lot of thanks. I am testing and its wonderfull!, incredible!.

Its curious,, I delete the folder /.cache/rclone/vfs/ but the size of the disc dosnt increase!, I am trying to find where are the GB used! :slight_smile: , because if I kill the rclone process inmediately increase the size deleted on the cache folder. Its curious

I can only say ... The rclone designer and programmer is a genius, amazing program!!!

Any linux thing works like that. You can delete a file in use but the space isn't returned until the process using the file is terminated.

AAA I didnt know it :slight_smile: Thanks Thanks

Hello, perhaps I am doing something bad....
I am using.
rclone mount team1pruebacachevfs:/ /home/ubuntu/team1pruebacache2/ --allow-other --vfs-read-ahead 10G --vfs-cache-mode full --vfs-cache-max-age 48h --vfs-cache-max-size 10G
on rclone version: rclone v1.52.3-294-g61c7ea40-beta

Works fantastic, store the file on cache great! but I have defined 48 hous (--vfs-cache-max-age 48), but on morning I test it, play file, and the file download to cache, I tst the cache on night and right it is there, but morning next day the cache is empty...

I am using worng parameter??
I have test scheduled jobs on cron and disable all but same problem.

Lot lot of Thanks.

You'd have to share a debug log and reproduce the issue.

Ok, I mount with logfile to see and will post it....

Lot of thanks.

If the file size is exactly 10G, then even a small read of another file will cause the first file to be removed from cache. This is because you have the cache max-size too as 10G.

Generally, it can be greater depending on how much disk is available.

Hello, I am testing with a file of 2.2 G other 6.6 G and other 60 Gb, this last I have download a part and stop playing, the size of the cache is 9.1G from now to tomorrow I will not touch to see the log.... And post comment.
I have 45G free on internal storage.

Lot of thanks.

Rather than guessing, a log file would shed light on it.

I must wait tomorrow, if the error persist...

Hello, I ahve test and now works fine!, I dotn understand why but it works fine. Now I have the problem bwlimit , can I use this comand?

rclone mount -vv team1:/ /home/ubuntu/team1/ --allow-other --vfs-read-ahead 50G --vfs-cache-mode full --vfs-cache-max-age 120h --vfs-cache-max-size 50G --bwlimit=10M --log-file=/home/ubuntu/LOGvfscache-Master.txt

I use but dosnt limit the download... may be I am using this bad?


Only upload is limited

Aa ok

Lot of thanks

That's not the case, bwlimit applies to both directions.

You'd have to share more details and a debug log of what you are seeing.