Anyone using tmpfs for the cache dir?

so I previously posted about performance issues due to the fragmented nature that happens with the sparse file writing of the cached files. While I have 1TB dedicated to my cache right now, I'm wondering if I could do better (as I don't really have that many active threads of execution) with a smaller cache (say 1-4GB) but stored on in ram via tmpfs.

has anyone used tmpfs for this purpose?

I did that for Plex for quite some time for transcoding and it worked quite well if you have extra memory on the server for that purpose.

For sparse files/rclone, you need enough space to write the whole file though so if you are streaming a 10GB file, you need 10GB of space or it fails.

Example would be:

2021/01/14 07:39:09 ERROR : blah.mkv: vfs cache: failed to download: vfs reader: failed to write to cache file: write /dev/shm/vfs/gcrypt/blah.mkv: no space left on device

and the cp/rclone mount all get jacked up.

as in a write cache or also for read cache? was hoping for read cache that it could just drop the file and start again in the worst case.

I was referring to full mode and reading a file. I'd assume write would be the same behavior.

You can test it just by copying a file from the mount as the way sparse files are done, it requires the space for the full file to be there as it's not chunk based like the old cache mode.

ok, so wouldn't work for my needs then. don't have 100+GB of ram to cache the largest files.

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