Accelerate Storage Spaces with SSDs in Windows 10 Storage Pool tiers

Create Storage Spaces in Windows 10

Windows Server O/S contains Storage Spaces support for Server Spaces tiered storage. You can front slower spinning disks with smaller faster SSDs. Windows 10 has a Storage Spaces GUI Control Panel that does not include the tiered storage GUI. This means Powershell must be used for all configuration.
Physical Disks
https://github.com/freemansoft/win10-storage-spaces contains scripts that create tiered storage pools that integrate SSDs as caching drives and HDDs as storage drives. They assume you have at least one SSD and one HDD.
  • The scripts automatically find all raw drives and add them to the pool.
  • Some HDDs have their types incorrectly identified. The script can coerce them to be MediaType:HDD
  • The entire virtual drive is added to the system as a single large volume
  • You need at least
    • 1 SSD and 1 HDD to run cached storage / Simple resiliency
    • 2 SSD and 2 HDD to run cached storage / Mirror resiliency /
    • 1 SSD and 2 HDD to run cached storage / Simple resiliency / striped storage (sum of HDD space)
Simple Mirrored Mirrored and Striped

Simple vs Mirror

The "Mirror" resiliency level attempts to mirror both SSD and HDD tiers so you would need 4 drives run mirror, to mirror both tiers

Scripts

new-storage-space.ps1

Creates a tiered storage pool and allocates all the disk space to a single drive
  • You can change the drive letter and label by editing the variables at the top.
  • the script can auto size the drive and cache. That didn't work for me so the script supports manual sizing.

remove-storage-space

Removes the virtual drive, the storage tiers and then the storage pool.
  • All drives are returned the Primordial pool

Sample configuration

new-storage-space.ps created a Virtual drive from 3 physical drives
Physical DrivesStorage Space Virtual Drive
two 2TB HDDsingle 3.6TB data volume striped across my two HDD
one 200GB SSD.with a 200GB read/write cache
Simple resiliency with striped drives

Win 10 Pro Storage Spaces Control Panel

The control panel does not display or manipulate tiers

Video


Meaningless Benchmark

All Storage Pool drives connected to 3Gb/s SATA. The write-back cache is not used with sequential writes over 256KB
[Read]                           *Single 2TB no cache*           *Two 2TB mirrored with 200GB cache*
Sequential 1MiB (Q=  8, T= 1):   160.497 MB/s [    153.1 IOPS]   282.983 MB/s [    269.9 IOPS]
Sequential 1MiB (Q=  1, T= 1):   156.766 MB/s [    149.5 IOPS]   254.605 MB/s [    242.8 IOPS]
    Random 4KiB (Q= 32, T=16):     1.748 MB/s [    426.8 IOPS]   175.272 MB/s [  42791.0 IOPS]
    Random 4KiB (Q=  1, T= 1):     0.527 MB/s [    128.7 IOPS]    21.189 MB/s [   5173.1 IOPS]

[Write]                          *Single 2TB no cache*           *Two 2TB mirrored with 200GB cache*
Sequential 1MiB (Q=  8, T= 1):   153.896 MB/s [    146.8 IOPS]   226.825 MB/s [    216.3 IOPS]
Sequential 1MiB (Q=  1, T= 1):   154.147 MB/s [    147.0 IOPS]   230.149 MB/s [    219.5 IOPS]
    Random 4KiB (Q= 32, T=16):     2.033 MB/s [    496.3 IOPS]   149.000 MB/s [  36377.0 IOPS]
    Random 4KiB (Q=  1, T= 1):     1.706 MB/s [    416.5 IOPS]    38.790 MB/s [   9470.2 IOPS]

Credits


Created 4/2020

Comments

  1. The script is great - I'm having problems with it, however.

    If I change the $DriveTierResiliency = "Simple" to $DriveTierResiliency = "Parity", the script fails at line 83 and won't initialize the disk. What am I doing wrong?

    I have a large drive set-up - 4 SSDs, 12 HDDs. Please help!

    ReplyDelete
  2. I've been planning on using this script to replace my NAS drive - I have 4 SSDs and 12 HDDs.

    When I change the script line 15 of the script from:

    $DriveTierResiliency = "Simple"

    to

    $DriveTierResiliency = "Parity"

    The script fails at line 83, saying Initilaize-Disk : Failed.

    The details below it say:
    + CategoryInfo : NotSpecified: (StorageWMI:Root/Microsoft/Windows/Storage/MSFT_Disk) [Initalize-Disk], CimException
    + FullyQualifiedErrorID:StorageWMI 4,Initialize-Disk

    Any thoughts?

    ReplyDelete
    Replies
    1. You can only use Disk Tiering with Simple and Mirrored storage spaces. You can't using Disk Tiering with Parity. You can set the SSD to journal, which makes it a dedicated cache disk. You can't add this in the total of the actual drive size for the virtual drive for this reason. You must have at least 2 SSD's for Parity as they are actually a mirror and 4 SSD's for dual-parity. Below is what I used to create a drive with 2 500GB SSD Journal drives and three 14TB (12.7 Teribyte) drives. I had to play around with the size when creating the virtual disk to get it to work but I get sustained reads of 330MB/s and sustained writes starting at above 1.5GB/s then setting down to about 300 to 330MB/s. You get better performance with Tiering but it doesn't work with Parity in Windows 10/11 (Currently using Windows 11). I played around with setting the WriteBackCache to different sizes but it seemed like leaving it at Auto gave the best results but you may get different results.

      # See what disks you've got available so you can set the below variables
      Get-StoragePool -IsPrimordial $true | Get-PhysicalDisk | Where-Object CanPool -eq $True

      # Tell Windows which disk is a traditional HDD and which is an SSD
      #$HDDs = "PhysicalDisk4", "PhysicalDisk6", "PhysicalDisk10"
      #$SSDs = "PhysicalDisk0", "PhysicalDisk2"

      $StoragePoolName = "My Parity Backup"
      $TieredDriveLetter = "B"
      $TieredDriveLabel = "Backup"
      $TieredDiskName = "Parity Drive"
      $SubSysName = (Get-StorageSubSystem).FriendlyName

      $HDDParityDrives = Get-PhysicalDisk |? {$_.FriendlyName -eq "ASMT 2135"} |? {$_.CanPool -eq $True}
      $SSDParityDrives = Get-PhysicalDisk |? {$_.MediaType -eq "SSD"} |? {$_.CanPool -eq $True}

      # Create a new storage pool (these are fairly default options)
      New-StoragePool -StorageSubSystemFriendlyName $SubSysName -FriendlyName $StoragePoolName -PhysicalDisks $HDDParityDrives -ResiliencySettingName Parity

      # Add in your two (or more) Journal disks
      #Add-PhysicalDisk -PhysicalDisks (Get-PhysicalDisk |? {$_.MediaType -eq "SSD"} |? {$_.CanPool -eq $True}) -StoragePoolFriendlyName $StoragePoolName -Usage Journal
      Add-PhysicalDisk -PhysicalDisks $SSDParityDrives -StoragePoolFriendlyName $StoragePoolName -Usage Journal

      New-VirtualDisk -StoragePoolFriendlyName $StoragePoolName -FriendlyName $TieredDiskName -NumberOfColumns 3 -ProvisioningType Thin -AutoWriteCacheSize -ResiliencySettingName Parity -Size 26.5TB
      # Create the virtual disk and get it ready for use
      #New-VirtualDisk -FriendlyName $TieredDiskName -StoragePoolFriendlyName $StoragePoolName -NumberOfColumns 3 -ProvisioningType Thin -ResiliencySettingName Parity -Size 2TB
      # | Initialize-Disk -PassThru -PartitionStyle MBR `
      # | New-Partition -AssignDriveLetter -UseMaximumSize `
      # | Format-Volume -FileSystem NTFS `
      # -NewFileSystemLabel "Parity Protected & Journaled" -Confirm:$false

      Get-VirtualDisk $TieredDiskName | Get-Disk | Initialize-Disk -PartitionStyle GPT
      ## This will be Partition 2. Storage pool metadata is in Partition 1
      ## STOP HERE IF YOU DO NOT WANT TO FORMAT YOUR DRIVE VIA POWERSHELL, WINDOWS PICKS CLUSTER SIZE. 4K Cluster Size Maxes out at 16TB, 8K at 32TB, ECT
      Get-VirtualDisk $TieredDiskName | Get-Disk | New-Partition -DriveLetter $TieredDriveLetter -UseMaximumSize
      Initialize-Volume -DriveLetter $TieredDriveLetter -FileSystem NTFS -Confirm:$false -NewFileSystemLabel $TieredDriveLabel
      Get-Volume -DriveLetter $TieredDriveLetter
      Disable-BitLocker -Mountpoint "B"

      Delete
  3. Your https://github.com/freemansoft/win10-storage-spaces link goes to blogger.com

    ReplyDelete
  4. Trying this later this week. Do you know if you can Stripe 2 HDD (simple) and use 2 SSD for the cache. I want the larger size, have 2 SSDs and a good backup strategy to NAS+cloud+external drive.

    ReplyDelete
    Replies
    1. I tried this and got better results with on SSD and 2 HDD's. Not sure why, but when two SSD's are in Simple, they just don't seem to get as fast write speeds when in the performance tier. Ended up getting the Samsung X5, get initial bursts of 1.8 to 2.0GB/s then after roughly 10GB/s transferred it settles at around 600MB/s for sustained writes with one SSD and 2 WD 14TB spinning drives (25.7TB total)

      Delete
  5. With all respect the tiering is not the same with the caching.
    Clinet Win10 has no caching in storage spaces, only tiering is available.

    ReplyDelete
    Replies
    1. You correct, they aren't the same. But in the context of most home PCs tiering would actually be better than caching, would it not?

      It may not have the same burst performance, but if you have 2 or 3 or more drives and you are shuffling things around to make room on your Fast SSDs vs your Slow SSDs (or your SSDs vs your HDDs), having the software take care of that automatically seems like a great way to not have to worry storage management.

      I am surprised M$ is not making this baked in.

      Delete
  6. This worked perfectly for 2 SSD + 2 HDD in a Mirror.
    My only question is the format NTFS v ReFS. Would it not be better to choose ReFS.

    I tried to change the file format but the script failed.

    ReplyDelete

Post a Comment

Popular posts from this blog

Installing the RNDIS driver on Windows 11 to use USB Raspberry Pi as network attached

Home FIOS Network - Exploring the 4 boxes and their connections

Meetings without Agenda and Background Must Die