Skip to content

Instantly share code, notes, and snippets.

@Zsoldier
Created March 3, 2021 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zsoldier/f25a24509e2b5aa68c259f10325a9a87 to your computer and use it in GitHub Desktop.
Save Zsoldier/f25a24509e2b5aa68c259f10325a9a87 to your computer and use it in GitHub Desktop.
How to run several diskspd instances.
$testtimer=1800
$writepct=50
$blocksize='64k'
$threads=4
$outstandingio=16
$warmuptime=5
$filesize="10G"
$drives=@('D','E','F','G')
#$drives=@('E')
$diskspdpath = "C:\Users\Administrator\Downloads\DiskSpd\amd64\diskspd.exe"
$OutputPath = "C:\Users\Administrator\Downloads\"
$fileformat = '.txt'
Foreach ($drive in $drives){
$date = Get-Date -Format 'yyyyMMdd-HHmmss'
$data = ($OutputPath + $drive + '-' + $blocksize + '-' + $date + $fileformat)
Start-Process cmd.exe `
-ArgumentList ('/K' + $diskspdpath + ' -d' + $testtimer + ' -r' + ' -w' + $writepct + ' -t' + $threads + ' -o' + $outstandingio + ' -b' + $blocksize + ' -Sh -L -W'+ $warmuptime +' -c' + $filesize + ' ' + $drive + ':\TestFile\10G-file.dat' + ' && ' + 'exit') `
-RedirectStandardOutput $data -WindowStyle:Minimized
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment