Is there a way to see the average age of files in a VFS cache?

Is there a way to see the average age of files in the vfs cache? I'm trying to work out how big to set mine. I see entries like this in my logs:

2021/08/19 18:10:09 INFO : vfs cache: cleaned: objects 1461 (was 1461) in use 1, to upload 0, uploading 0, total size 99.931Gi (was 99.931Gi)

My aim is to work out how big to set my cache based on the age of the oldest file is. I'm keen to get some more info to try and work out what files have been added to the cache by Plex background activity (e.g. does Plex just keeps filling and flushing the cache adding little value?) and how many by viewers playing a file.

My suspicion is that my viewing user "hit rate" is low at the moment as most of my cache is made of (i) Plex background files or (ii) files written to the cache before my rclone move job uploads them.

I know I could keep increasing the size until I hit my desired retention, but I don't know what the current retention is!

Or, alternatively - stats on the hit rate or how many files get used / transfer savings etc?

Thanks in advance.

You can look for 'in use', but you probably need debug as it'll show what's not being removed.

Rather than making the cache larger, I've reduced the cache-max-age as I think that'll solve my scenario where most of the files in the cache are added by Plex scans, or are in the cache because they are awaiting upload i.e. won't actually be read by a physical user.

I'm hoping that this will increase the chance that if someone restarts a show/movie, that their file will be there, without having to have a massive cache to get the same result.

I think of the cache as bonus anyway as we ran for some time without it and really no issues.

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