Good to know Storage Spaces information.

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

Jorge Perez

Active Member
Dec 8, 2019
125
54
28
I recently had to set up a new server at home, and I realized it's becoming very hard to find useful information with all the AI Crap being added to search engines. So I'm going to post useful commands here.

First off here's how to set up a three layer cache setup, this assumes 4x 18TB HDDs, unspecified SSD Tier, and a 118GB Optane write cache.

Code:
New-StorageTier -StoragePoolFriendlyName "MainPool" -FriendlyName SSD_Tier -MediaType SSD -ResiliencySettingName Mirror

New-StorageTier -StoragePoolFriendlyName "MainPool" -FriendlyName HDD_Tier -MediaType HDD -ResiliencySettingName Parity

$ssd_tier = get-StorageTier -FriendlyName "SSD_Tier"
$hdd_tier = get-StorageTier -FriendlyName "HDD_Tier"

New-Volume -FriendlyName "MainStorage" -FileSystem ReFS -StoragePoolFriendlyName "MainPool" -StorageTierFriendlyNames SSD_Tier, HDD_Tier -StorageTierSizes 1.7TB, 25.4TB -WriteCacheSize 110GB
Here's some supporting commands.

Code:
// chech cache status
fsutil fsinfo refsinfo m:
//set power protected flag
Set-StoragePool -FriendlyName "MainPool" -IsPowerProtected $true
//Emable Windows Memory Compression
Enable-MMAgent -MemoryCompression
//Configure Cache Destage ratio
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Policies\DataDestageSsdFillRatioThreshold DWORD
Here's some setup for deduplication.

Code:
//Enable Dedup
Enable-ReFSDedup -Volume m: DedupAndCompress
//Set up automatic Dedup
Set-ReFSDedupSchedule -Volume m: -CpuPercentage 15 -CompressionFormat LZ4 -Start "1:00 AM" -Days Monday,Wednesday,Saturday -Duration 4:00:00

//Run manual Dedup Job
Start-DedupJob -Type Optimization -Volume M: -Memory 15 -Cores 15 -Priority Low
Start-ReFSDedupJob -Volume "M:\" -FullRun -Duration 5 Hours -CompressionFormat LZ4

//Set up automatic Dedup
Set-DedupSchedule -Name WeeklyScrubbing

//Pause optimization when system becomes busy.
Set-DedupSchedule -Name WeeklyGarbageCollection -StopWhenSystemBusy $True
Set-DedupSchedule -Name WeeklyScrubbing -StopWhenSystemBusy $True

//Limit Mainteanance Memory Usage
Set-DedupSchedule -Name WeeklyGarbageCollection -Memory 15
Set-DedupSchedule -Name WeeklyScrubbing -Memory 15

//Get Dedup Status

Get-ReFSDedupStatus -Volume m: | FL
 
Last edited:

ca3y6

Well-Known Member
Apr 3, 2021
749
718
93
How does that make a 3 tier caching? Does WSS know how to distinguish different types of SSDs?

At one point I was hoping to have a slow SATA/SAS SSD parity tier with a fast NVME SSD mirror tier for caching, but apparently WSS hardcodes all its assumptions and is only meant for one tier of SSD as a cache in front of HDD and nothing else.
 

Jorge Perez

Active Member
Dec 8, 2019
125
54
28
SS splits up disks as NVMe/SATA SSD/HDD.

As long as you have those three different types, it will do three tier caching.
 
  • Like
Reactions: ca3y6

gea

Well-Known Member
Dec 31, 2010
3,597
1,417
113
DE
Last edited: