Moving Unraid AppData to its own Cache Pool for improved performance

With Unraid 6.9, it’s pretty easy to add multiple cache pools. The benefit of these pools are you can now have a cache per share in Unraid. When you isolate out the cache duties to a single share you get some side benefits; less likely to see random I/O read/write and less cross talk between shares. The big win here is that you could consider using a very cheap 10K or 15K rpm spinner drive in front of a media share as media is usually long, contiguous writing which will be max performance on a spinner resulting in speeds north of 200MB/s. Cache pools also give way to taking advantage of smaller, high performance SSDs and for those of us on high-drive-bay machines like SuperMicro 826, 836, 837, 846, 847 this can come in handy with SAS SSDs.

Before making this upgrade, my stack consisted of an 800GB HGST SAS SSD for my AppData+Share Caching, a 3.2TB u2 NVMe in a PCIe slot for general swap, and around 100TB of spinners in a single-parity array. I was running Unraid’s mover every few days.

After this upgrade, my stack still is in the 100TB array size but I now run a 3.2TB SAS SSD for media caching (what is now the “Cache” pool) and then a very performant 200GB HGST SAS SSD for AppData and Docker image as shown below:

Disclaimer This setup works well for me because I have daily backups of my entire array so my exposure to my cache drive(s) failing is 24 hours, which is less than how often most people run their mover, and is a level I am comfortable with. If I did not have daily backup of my entire array, I would not bother with such a large media cache pool as it is unlikely to fill. I opted for the large cache so that new content/media is very accessible for a few weeks.

The process to move AppData to another drive is pretty straight forward if you have a standard Unraid install:

  1. Disable Docker (so nothing is writing to AppData)
  2. Shut down array
  3. Add your new Cache drive
  4. Click “Add Cache Pool” on the array management tab, Main, and name it
    It should now show up if you’re in command prompt and check your mnt folder:
  5. Start your array
  6. Go to each share and set the cache to your new cache pool. For AppData, I set the “domains” “system” and “appdata” to go to this location. If you’re running VMs you may want go with an alternate pool configuration. For my use-cases, a single, fast drive was sufficient for these three folders.
  7. Open command prompt and (if you don’t have it, I suggest rsync for this step) copy the content from your previous cache drive to your new cache drive.
    You should check your existing cache folder first: image
    It is worth noting that in my case here, my Cache had “Backups” on it so I ran the mover so that the only folders on my Cache drive were “appdata” “domains” and “system.” If your Cache drive has more then just copy those three folders. Now navigate into your new cache folder and run the rsync command to copy all of the contents. This will not delete anything from your old cache drive.
    image
  8. Verify / spot check the data looks right
  9. Start up Docker and be well
1 Like

A few notes before getting started:

  • Make a backup of your data on the cache before doing any of this!!!
  • Cache pools cannot share names with Shares (ie, you can not have a cache pool named appdata if you have a share named appdata)
  • Make sure your CA Backup and any other docker images, plugins, etc are using the correct cache pool path

If you feel uncomfortable using the command line to move your cache you have two choices; Midnight Commander or Unraid Mover.

Using Midnight commander

  1. MC works almost exactly like Krusader and provides a gui for you to navigate.
  2. Type mc into the terminal to get a gui and move it over.
  3. Use tab to changes sides and the F1-F10 keys to do actions
  4. Navigate to /mnt/cache on one side
  5. Navigate to /mnt/NEWCACHENAME on the other side
  6. Highlight the files you want to move over and then press F6 (RenMov) to move them
  7. ???
  8. Profit!

Using Mover to do it (Will take a long time and write on your array)

  1. Disable docker so nothing is writing to appdata
  2. Change your share settings to move everything off the cache (change cache to Yes)
  3. Run Mover to move all files off your cache drive
  4. Once all files are moved, change share settings to move things back to your cache (change cache to Prefer)
  5. Also make sure your cache pools are set to the cache pool you want
  6. Run Mover once again to move things back to the proper cache pool.
1 Like