[SOLVED] CACHE drive not caching


RobertP

Recommended Posts

I added an 1 TB SSD cache drive (previously I had no cache drive), but it is not being used. It IS functional, I’ve moved “appdata” and “system” over to it, so I know the drive is OK.

 

Side note question – why is it recommended to put appdata and system on the cache drive?

 

I did a pre-clear, then assigned it as cache drive and did a format. I’ve moved 2 folders to the cache drive (per SpaceInvader One’s instructions - https://www.youtube.com/watch?v=ij8AOEF1pTU ). I did NOT move domains ‘cause I don’t do much with VMs and don’t really want the couple VMs that I’ve played with to be consuming a big chunk of the cache drive. The main thing this unRAID server is for is holding backup images of various different computers around the house – and those backup images can be big so I want the cache “wide open”.

 

I’ve set one of my user shares to “Use Cache” setting of YES.

I’ve gone into the main SETTINGS tab, GLOBAL SHARE SETTINGS and set the USE CACHE DISK to YES. I’ve played around with a few different sizes on the “Min free space” – right now it is set to 1MB

 

But when I run a backup that uses that share, the backup does not get sent to the cache drive first. I’ve also tried manually copying some files of various different sizes to that share – the cache drive is not getting used.  The copies go straight to the user share.

 

Since adding the cache drive, I've seen no speed gain in the copies, and after the copy if I look at MAIN, Cache, VIEW it does not show anything there (other than the 2 folders I manually moved). I click MOVE NOW and it is done in a second.

 

What is this newbie missing?

ur1-tower-diagnostics-20200217-0028.zip

Link to comment

With cache value of yes any writes to share with that value should go onto cache first and then move to the array when mover is enabled. I would write to a share with cache set to yes and then watch for the write activity on the main page. It SHOULD be against the cache disk and parity obviously, only. First line of attack ... no doubt someone will be along with plenty of other advice ...

Edited by superloopy1
Link to comment

Nope -
I've got my user share "UR-BU-i7" set to USE CACHE of YES.

I've got my SETTINGS, USE CACHE DISK set to YES.

Doesn't matter if I do a backup to that share, or if I manually copy a small file (3KB) or few big files (four 1GB files), nothing goes to cache.  I've tried copying to the "root" of "UR-BU-i7" and I've tried copying to a folder under that.  Nothing happens to cache.  After I do the copy, on the MAIN tab I click on the VIEW icon to the far right of the CACHE device - the files I copied are not showing up.  Also, the cache's USED and FREE space is not changing.  Copying the same files to a user share that is set to USE CACHE of NO - the copy speed is the same.

Do I need to MANUALLY create a "UR-BU-i7" on the cache first?  (If yes, then HOW?)

As I said, I was able to MOVE the appdata and system folder to the cache using mover ("use cache" is set to PREFER for them).

Link to comment
Side note question – why is it recommended to put appdata and system on the cache drive?  

 

It is recommended to store appdata, system, domains, etc. on an SSD cache drive or unassigned device so docker container or VM activity does not cause array drives to spin up or remain spun up unless they are actually needed to write or access files. Also for performance reasons for docker and VMs.  

 

For future reference it is not necessary to preclear SSDs. That just results in a lot of unnecessary writes to the SSD.

 

Now, not to be Captain Obvious, but, when you changed the share cache setting to Yes, did you click on the Apply button to save that change?

 

Sent from my iPhone using Tapatalk

 

 

 

Link to comment

lol - yes, I clicked APPLY.  But that is a good question to ask.

BUT - problem solved!  The SSD is a 1TB drive.  With the system files on it, there was about 980GB or so free.

Because I use my unRAID as a place to store my backups, and because some of those backups can be quite large, I had that share set to MOST-FREE and, ****more importantly**** I had the Minimum free space set to 1TB.  Since the cache would not hold 1TB, it apparently went straight to the share.  I dropped the minimum free space down to 800GB and now it is using the cache!

Be interesting to see if this speeds up my next weekly backups next weekend!

Link to comment
  • 3 weeks later...

Ive got the same issue,  but with a 120G SSD cache. Checked all the share settings Ok. Cache disk has the appdata and system folders. the Domain and ISOs shares are not used as the box cant run VMs. The only share is "Backup" .

Writing files to the Backup share never uses cache!  Share is set to High-water, 1MB min,  Cache: Yes.

What should I look for to troubleshoot this?

Quote

Model: TS-669-Pro

M/B: Intel Corporation Granite Well Version FABA - s/n: 1.0

BIOS: Phoenix Technologies Ltd. Version QU95PR57. Dated: 06/28/2013

CPU: Intel® Atom™ CPU D2700 @ 2.13GHz

HVM: Not Available

IOMMU: Not Available

Cache: 32 KiB, 512 KiB

Memory: 3 GiB DDR3 (max. installable capacity 4 GiB)

Network: bond0: fault-tolerance (active-backup), mtu 1500
 eth0: interface down
 eth1: 1000 Mbps, full duplex, mtu 1500

Kernel: Linux 4.19.107-Unraid x86_64

2020-03-17_005320-UNNAP_Share.jpg

2020-03-17_004908-UNNAP_Main.jpg

Link to comment

Hi,  Global Cache set to YES, Min. free space: 200,000,000, which I incorrectly assume as Bytes,  but apparently its 1024byte blocks (confusing)!  So that means the global floor is set to >200GB! 
I don't recall ever looking at this setting so it must be the default.

Q1 - Is 200000000 the default upon installation, if so why so high ?

Q2 - Why do global settings override local settings,  isn't that the wrong way around ?

 

I've set the Global Share Settings - Cache Settings - Min. free space: 100MB

Now fixed.

2020-03-17_112427-UNNAP_ShareSettings.jpg

Link to comment

That was definitely not the default. I think that was 3 zeros too many.

 

The Minimum Free for cache is similar but different from Minimum for each user share.

 

Each user share has a Minimum Free. If an array disk has less than Minimum when Unraid decides which disk to write a file to, it will choose a different array disk. You should set Minimum Free for each user share to larger than the largest file you expect to write to that user share. Once Unraid has chosen a disk to write the file it will try to write the whole file to that disk even if it runs out of space.

 

For Cache Minimum Free, if a user share is cache-yes or cache-prefer, then if cache has less than minimum when Unraid decides which disk to write a file to, it will choose an array disk instead of cache. This is sometimes called "overflowing to the array". Note that a cache-only user share will not overflow (and a cache-no user share will not write to cache anyway).

 

Similarly, you should set Minimum Free for cache (in Global Share Settings) to larger than the largest file you expect to write to cache.

Link to comment
3 hours ago, lemoncurry said:

Ahh,  yes,  I got confused between Cache settings and Array share settings. Obvious now really. Maybe I did add the zeros back when I first set it up, assuming the setting is bytes. ie 200000000=200MB not 204GB!

Cheers. Thanks for the very fast assistance.

 

If for any reason you need to edit that field it is much easier if you use one of the suffixes to specify the units being used.

Link to comment
  • 2 years later...
  • RobertP changed the title to [SOLVED] CACHE drive not caching

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.