@@ -95,12 +95,15 @@ param (
9595 $DataFileSize = " 5G" ,
9696
9797 [Parameter (Mandatory = $false , Position = 5 )]
98- $BlockSize = " 1M" ,
99-
98+ $ReadBlockSize = " 1M" ,
99+
100100 [Parameter (Mandatory = $false , Position = 6 )]
101- $Threads = 8 ,
101+ $WriteBlockSize = " 4M " ,
102102
103103 [Parameter (Mandatory = $false , Position = 7 )]
104+ $Threads = 16 ,
105+
106+ [Parameter (Mandatory = $false , Position = 8 )]
104107 $ThrottleLimit = 2
105108)
106109# region Variables
@@ -114,7 +117,8 @@ function Start-DiskspdTest{
114117 $diskspdPath ,
115118 $DataFileSize ,
116119 $Threads ,
117- $BlockSize ,
120+ $ReadBlockSize ,
121+ $WriteBlockSize ,
118122 $EntropySize ,
119123 $OutPath
120124 )
@@ -164,7 +168,16 @@ function Start-DiskspdTest{
164168 # endregion
165169
166170 Write-Progress - Activity " Executing DiskSpd Tests..." - Status " Executing Test $TestNumber of $TestCount " - PercentComplete ( ($TestNumber / ($TestCount )) * 100 )
167- $arguments = " -c$ ( $DataFileSize ) -w$ ( $WriteTest ) -t$ ( $Threads ) -d$ ( $TestDuration ) -o$ ( $IODepth ) -b$ ( $BlockSize ) -Z$ ( $EntropySize ) -W20 -Rxml -si -L $ ( $Volume.Name ) iotest.dat"
171+ switch ($IOType ){
172+ " read" {
173+ $WriteTest = 0
174+ $arguments = " -c$ ( $DataFileSize ) -w$ ( $WriteTest ) -t$ ( $Threads ) -d$ ( $TestDuration ) -o$ ( $IODepth ) -b$ ( $ReadBlockSize ) -Z$ ( $EntropySize ) -W20 -Rxml -si -L $ ( $Volume.Name ) iotest.dat"
175+ }
176+ " write" {
177+ $WriteTest = 100
178+ $arguments = " -c$ ( $DataFileSize ) -w$ ( $WriteTest ) -t$ ( $Threads ) -d$ ( $TestDuration ) -o$ ( $IODepth ) -b$ ( $WriteBlockSize ) -Z$ ( $EntropySize ) -W20 -Rxml -si -L $ ( $Volume.Name ) iotest.dat"
179+ }
180+ }
168181
169182 # Write-Output "diskspd.exe $arguments"
170183
@@ -187,13 +200,13 @@ foreach ($Computer in $ComputerName){
187200 $InvokeCommand = @ {
188201 ComputerName = $Computer
189202 ScriptBlock = ${Function: Start-DiskspdTest}
190- ArgumentList = $Computer , $TestDuration , $diskspdPath , $DataFileSize , $Threads , $BlockSize , $EntropySize , $OutPath
203+ ArgumentList = $Computer , $TestDuration , $diskspdPath , $DataFileSize , $Threads , $ReadBlockSize , $WriteBlockSize , $EntropySize , $OutPath
191204 ThrottleLimit = $ThrottleLimit
192205 }
193206 }else {
194207 $InvokeCommand = @ {
195208 ScriptBlock = ${Function: Start-DiskspdTest}
196- ArgumentList = $Computer , $TestDuration , $diskspdPath , $DataFileSize , $Threads , $BlockSize , $EntropySize , $OutPath
209+ ArgumentList = $Computer , $TestDuration , $diskspdPath , $DataFileSize , $Threads , $ReadBlockSize , $WriteBlockSize , $EntropySize , $OutPath
197210 }
198211 }
199212 Invoke-Command @InvokeCommand
0 commit comments