Adding an SSD to Microsoft Storage Spaces to act as a cache

I want to improve performance of my storage space. I am using two-way mirror with two spinning HDDs, and I just added an SSD I want to act as a cache. But the SSD actually added storage capacity to the pool. Is this normal? Is it possible to configure it to behave as a cache?

Posted Feb 25, 2021, 11:15 PM UTC

16222
drdrew16•

You can, but you’ll need to do it through PowerShell. I did it for mine when I was running it a year or so ago. I’ll see if I can dig up my old code.

43
[deleted]•

Is the performance boost worth the effort and money? I've been thinking about doing this as well. Sub'd for the code.

16
drdrew16•

Ok so I don’t have my original code (lost my hosted git instance in a hardware failure and it never made it to Github) but this looks really close to what I used:

https://github.com/freemansoft/win10-storage-spaces

26
[deleted]•

Kickass! Thanks!

8
drdrew16•

Personally I didn’t think so, but I was also using “slow” SATA SSDs

5
WingyPilot1TB = 0.909495TiB•

Give PrimoCache a try. It will cache anything you want it to.

https://www.romexsoftware.com/en-us/primo-cache/

21
collins_amber•

Didn't worked for me. Hard-drives still struggled to load when set sorting to date.

3
ET2-SW•

I don't think that is dependent on hardware. I have about 10k files completely on an MX500 that I sort by date, and it still can take upwards of a minute to do it.

Haven't tried it in Linux or Mac, but Windows sure sucks at that specific task.

4
collins_amber•

But if you group them by date, its fast.

1
[deleted]•

[deleted]

1
SirCrest_YT92TB ZFS / 63TB GDrive•

Primocache is probably what you want honestly. Caching on Storage Spaces isn't what you generally are hoping for. At least in my years of using it.

It's done during the generation of the virtualdisk through use of the tier for read caching. It will only use a tiny amount for Writeback. Just adding it to the pool doesn't enable caching.

12
Mffls•

You can build a "Tiered Storage Spaces" in windows, which will probably do what you want. While presenting as one disk to the OS, Internally it'll have three levels: Slow HDD massive storage, Fast SSD storage, and a dedicated part of the SSD storage as cache. Windows will regularly optimise the way files are distributed across the disk to optimise access patterns. It even works with if you add striping to it, which is how I currently use it for my storage/games Disk in my PC. Works very well in practice for me.

To use it on Windows Home/Professional is a bit of work since they only include offical support in Windows Server, but you can do it fairly easily if you're able to use PowerShell.

The place I learned about it is here: https://forum.level1techs.com/t/microsoft-tiered-storage-spaces-ssd-hdd-performance-worse-than-hdd/127515

EDIT: Ah perhaps the github page linked by drdrew16 is a bit more useable. Ohwell, now you've got two examples:)

The code I used to build my own striped tiered storage space is here: https://github.com/Maffels/PowerShell/blob/master/Tiered%20Storage%20Spaces

8
dxps26•

I have this exact setup, with 3x 120gb SSD's and 3x 2tb Laptop HDD's - it generates a virtual disk with 5.71tb of storage, that I have my nightly backups dumped into. Full Striping, Zero Redundancy.

Being that I've basically re-used older hardware to make a Frankenstein's monster of a disk, I don't expect it to be reliable, but I do expect it to be fast. Which it is, for my use case - the Franken-disk is automatically backed up on another disk once daily, as my actual backup.

I think it's a great way to reuse older SSD's and Drives as people switch to NVME drives, especially with smaller capacity SATA disks.

3
Mffls•

Ha exactly! I'm using two old-ish 1TB 3.5 inch disks, and two 128GB SSD's, one samsung 840 pro and basically the OEM equivalent I bought 2nd hand just for this purpose and for cheap. The buffer and SSD part reads and writes are around 1GB/s which together with the much improved I/O is fast enough for me for most things not fitting on my OS drive SSD.

The only thing you gotta watch out for in my experience is using an SSD which also uses an internal SLC cache. I set up a tiered storage spaces for a friend of mine where he used a 1TB micron NVME SSD, and while it was usually plenty fast, once the internal SLC cache ran out it actually was a bit slower sequentially than the 3x hardware RAID 0 he used as the HDD tier.

3
dxps26•

Yes, cheap SSD's are worth less than hard drives when it comes to this sort of application, with a good network reading off SSD's from other computers they tap out fast!

I'm actually using Intel 730 drives in this configuration, and my eBay-sourced 2tb laptop drives will probably start clicking before the SSD's wear out.

1
tb257198927TB•

You need proper enterprise level SSDs for this. I tried to do the same, I wanted to use a SN750 SSD to cache my storage spaces array. After speaking to people on the storage spaces slack you need a proper enterprise SSD with a battery cache.

The alternative would be to use something like PrimoCache (paid software but read-only priced) to create a cache in either ram or SSD (or hell, both). I have a RAM Cache that uses PrimoCache to cache writes from my 10gig network connection as the hard disks it's writing to don't get anywhere near the full speed

6
SilentStream•

Get an Optane SSD if you’re worried about endurance. Or just a PXXX (insert letter/number of Samsung or intel data center NVMe SSD) which don’t have batteries but instead have capacitors for power loss protection. Plenty of cheaper ones on eBay or the like. Eff batteries in a server. No thank you sir/ma’am

10
Slasher1738•

I just used primocache with Parity storage spaces. Very simple

3
abc_letsgo•

great idea

2
Relevant-Team•

Datacore can do this, but maybe not in your price range.

2
ultrahkr•

It gets added as storage capacity but! Behind the scenes it's a cache as long as it was correctly added...

2
Jermny•

If I remember correctly, you need 2x of your ssds for a caching layer for mirrored drives

2
[deleted]•

[deleted]

1
offtodevnull•

Are there advantages to using Storage Spaces for such a setup relative to native OS mirroring?

1