[6.9.2] Cache disks for beginners


Recommended Posts

Hey fellow unraiders,

 

I'm new to unraid and in need of a bit of guidance on how cache disks work in unraid and how best to utilize them.

 

Setup:

UNRAID - Version: 6.9.2

Array - 3 identical HDDs one of which parity, 1 SSD as cache disk.

 

Expectations:

I want to run docker containers and VMs off of the SSD to ensure better performance.

My expectation was that cached shares would prefer to read and write from the cache and periodically copy data back to the main array to ensure it is on safe storage.

Observed:

From reading the unraid documentation it seems that data is actually moved off of the cache instead of copied and this is only done if the files in question are not "hot". It is also not clear if the cache affects read performance. 

Now, given that the shares are storing container / VM data, a lot of which will be constantly seeing I/O I am worried that a) that data will never leave the cache and b) even if it ever does that would have a certain impact on performance.

So is the unraid cache only used to cache writes or as a general purpose cache?
If some data is comitted to the array can it be "upgraded" back to the cache when it becomes "hot" again?
Can the cache copy instead of move data?
Am I better off just adding my SSD directly to the array so that it is parity protected and forcing relevant shares to use the SSD drive exclusively? (this is somewhat inconvenient since you can't make more general use of the cache for all shares)
Are there other possible configurations here I am not seeing?

 

Thanks in advance for the help!

-Simeon

Link to comment
21 minutes ago, simeondorelov said:

So is the unraid cache only used to cache writes or as a general purpose cache?

this, and only for new files

 

21 minutes ago, simeondorelov said:

If some data is comitted to the array can it be "upgraded" back to the cache when it becomes "hot" again?

Unraid has no concept of 'hot' data.

 

22 minutes ago, simeondorelov said:

Can the cache copy instead of move data?

Not as standard.

 

25 minutes ago, simeondorelov said:

Am I better off just adding my SSD directly to the array so that it is parity protected and forcing relevant shares to use the SSD drive exclusively? (this is somewhat inconvenient since you can't make more general use of the cache for all shares)

Not if performance is important.  Running docker containers or VMs off the array does not perform well due to the overhead on writes of keeping parity updated in realtime so there is not normally much point in having a SSD in the array as its performance is largely wasted.

There are plugins that can handle periodic backups of docker container working sets (appdata) and VM vdisks to the array.

 

Many people do not bother to use the "cache" feature for shares, and reserve the pool (cache) for application purposes although this can be set on a share-by-share basis.

 

BTW:  Make sure you understand the meaning of the Use Cache settings on a share.   Many new users get the "Prefer" and "Yes" settings swapped.

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.