Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[6.9.2] Cache disks for beginners

Featured Replies

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

  • Community Expert
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.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.