Jump to content

Cache not working - can't figure out why


Go to solution Solved by itimpi,

Recommended Posts

Hi,

 

I'm currently trialling unRAID, having been using TrueNAS for quite some time. I'm liking it on the whole, but one thing totally vexing me is the cache feature. I've searched the forums and found post saying 'set the minimum' and no response beyond that. I've read the docs, googled, posted on Reddit, and asked on Discord. I'm still no further along with this.

 

I've got three 6TB drives in an array (one is parity) and two 250GB SSDs in the cache. The array is encrypted with a passphrase. The array is xfs, and the cache btrfs, I just accepted the defaults there, except swapping to the encrypted filesystem option. It's a J4105 with 16GB of RAM, and otherwise running nicely.

 

I've set all my shares to use the cache, and set the cache pool to 'yes'. I've also set minimum filesizes for all the shares to reflect the maximum file sizes; they're different per share as I have 'TV', 'Movies', 'Music', and a general 'Shared', so I've set them accordingly. I then rebooted to ensure the minimum filesize setting is working per direction over on Discord.

 

However. It doesn't work. I left it copying files into the Music share today (using FastCopy), and it stopped having run out of space. Sure enough, the cache shows as being full. If I try and copy a file in (from windows to a UNC path), it says it is full and there's no free space. The file is 20Mb, yet the share minimum filesize is set to 200Mb

 

So I'm baffled. I've collected the log files and see no errors. I've poked about everywhere I can think to look, but I'm no wiser.

 

I want to use the cache for two reasons - 1. I will have Windows backup running on my desktops and they'll be randomly throwing files at it, so it keeps the disks spun down, and 2. my hard drives are shingled (BOOO!!! Only just found this out), which is why I left TruNAS as ZFS and shingled disks do not get along. unRAID makes a lot of sense to me, apart from the fact it's misbehaving seemingly.

 

Thanks in advance. 

storage-diagnostics-20220725-2139.zip

Link to comment
  • Solution
2 minutes ago, KingDaveRa said:

Sure enough, the cache shows as being full. If I try and copy a file in (from windows to a UNC path), it says it is full and there's no free space. The file is 20Mb, yet the share minimum filesize is set to 200Mb

The Share Minimum Free Space value is applied when selecting array drives, not when deciding if the cache pool should be used instead of going straight to the array.   Looking at the diagnostics what you have NOT set is the Minimum Free Space value for the cache pool (it is currently set to,0).   You get to this setting by clicking on the pool on the `main tab.

Link to comment
18 minutes ago, KingDaveRa said:

Windows backup running on my desktops and they'll be randomly throwing files at it, so it keeps the disks spun down

More importantly than having user share writes not spinup disks is not filling cache so much that appdata, domains, system shares have to overflow to the array, because these really will keep disks spunup since these files are always open, and you also don't want docker/VM performance impacted by slower array.

 

So cache:yes might not be best in all cases for your other user shares.

 

Also note that mover is intended for idle time. It is impossible to move from fast cache to slower array as fast as you can write to cache.

 

 

 

Link to comment

Thanks all for the speedy replies. I've just set the cache minimum and lo' it's now doing what it should do. Thank you all for saving this dumbdumb's sanity!

 

I hadn't intended on setting all the shares to cache, so I might take some of them back off. Certainly the media shares rarely change so there's absolutely no benefit to those being cached. I do intend running a few docker applications so yes, I want them on the SSDs for definite. I think I'll play about a bit and see what works best. I'm keen to have the disks spin down and not be randomly spinning up through the day, as that won't do them any good. I'm doing it more to save on noise and heat than anything anyway. The energy savings are negligible.

 

Thanks again, everybody. :)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...