New ‘Test-SBDisk’ function added to SBTools module tests disk IO performance


SBTools module can be downloaded from the Microsoft Script Center Repository.

To install it, extract the .rar file, and run install-SBTools.ps1 in the folder where you extracted the .rar file.

Test-SBDisk:

This is a function to test disk IO performance. It uses other functions in the SBTools module like Log and New-SBSeed.

This function tests disk IO performance by creating random files on the target disk and measuring IO performance. It leaves 2 files in the WorkFolder:

  • A log file that lists script progress, and
  • a CSV file that has a record for each testing cycle

Parameters:

This function accepts 5 parameters:

  1. Parameter WorkFolder
    This is where the test and log files will be created.
    Must be on a local drive. UNC paths are not supported.
    The function will create the folder if it does not exist
    The function will fail if it’s run in a security context that cannot create files and folders in the WorkFolder
    Example: c:\support
  2. Parameter MaxSpaceToUseOnDisk
    Maximum Space To Use On Disk (in Bytes)
    Example: 10GB, or 115MB or 1234567890
  3. .Parameter Threads
    This is the maximum number of concurrent copy processes the script will spawn.
    Maximum is 16. Default is 1.
  4. Parameter Cycles
    The function generates random files in a subfolder under the WorkFolder.
    When the total WorkSubFolder size reaches 90% of MaxSpaceToUseOnDisk, the script deletes all test files and starts over.
    This is a cycle. Each cycle stats are recorded in the CVS and log files
    Default value is 3.
  5. Parameter SmallestFile
    Order of magnitude of the smallest file.
    The function uses the following 9 orders of magnitude: (10KB,100KB,1MB,10MB,100MB,1GB,10GB,100GB,1TB) referred to as 0..8
    For example, SmallestFile value of 4 tells the script to use smallest file size of 100MB
    The script uses a variable: LargestFile, it’s selected to be one order of magnitude below MaxSpaceToUseOnDisk
    To see higher IOPS select a high SmallestFile value
    Default value is 4 (100MB). If the SmallestFile is too high, the script adjusts it to be one order of magnitude below LargestFile

Examples

  • Test-SBDisk “i:\support” 3GB
    This example tests the i: drive, generates files under i:\support, uses a maximum of 3GB disk space on i: drive.
    It runs a single thread, runs for 3 cycles, uses largest file = 100MB (1 order of magnitude below 3GB entered), smallest file = 10MB (1 order of magnitude below largest file)
    Sample screen output:
    Test-SBDisk1Sample log file content:
    2014.08.06 09:20:30 AM: Computer: XHOST16, WorkFolder = i:\support, MaxSpaceToUseOnDisk = 3GB, Threads = 1, Cycles = 3, SmallestFile = 10MB, LargestFile = 100MB
    2014.08.06 09:20:46 AM: Cycle #1 stats:
    2014.08.06 09:20:46 AM: Duration 10.02 seconds
    2014.08.06 09:20:46 AM: Files copied 2.70 GB
    2014.08.06 09:20:46 AM: Number of files 25
    2014.08.06 09:20:46 AM: Average file size 110.70 MB
    2014.08.06 09:20:46 AM: Throughput 276.33 MB/s
    2014.08.06 09:20:46 AM: IOPS 8.84k (32KB block size)
    2014.08.06 09:20:59 AM: Cycle #2 stats:
    2014.08.06 09:20:59 AM: Duration 9.83 seconds
    2014.08.06 09:20:59 AM: Files copied 2.70 GB
    2014.08.06 09:20:59 AM: Number of files 25
    2014.08.06 09:20:59 AM: Average file size 110.70 MB
    2014.08.06 09:20:59 AM: Throughput 281.60 MB/s
    2014.08.06 09:20:59 AM: IOPS 9.01k (32KB block size)
    2014.08.06 09:21:15 AM: Cycle #3 stats:
    2014.08.06 09:21:15 AM: Duration 12.12 seconds
    2014.08.06 09:21:15 AM: Files copied 2.70 GB
    2014.08.06 09:21:15 AM: Number of files 33
    2014.08.06 09:21:15 AM: Average file size 83.87 MB
    2014.08.06 09:21:15 AM: Throughput 228.25 MB/s
    2014.08.06 09:21:15 AM: IOPS 7.30k (32KB block size)
    2014.08.06 09:21:15 AM: Testing completed successfully.
    Sample CSV file content:
    Cycle # Duration (sec) Files (GB) # of Files Avg. File (MB) Throughput (MB/s) IOPS (K) (32KB blocks) Machine Name Start Time End Time
    1 10.02 2.7 25 110.7 276.33 8.84 XHOST16 8/6/2014 9:20 8/6/2014 9:20
    2 9.83 2.7 25 110.7 281.6 9.01 XHOST16 8/6/2014 9:20 8/6/2014 9:20
    3 12.12 2.7 33 83.87 228.25 7.3 XHOST16 8/6/2014 9:20 8/6/2014 9:21
  • Test-SBDisk “i:\support” 11GB -Threads 8 -Cycles 5 -SmallestFile 4
    This example tests the i: drive, generates files under i:\support, uses a maximum of 11GB disk space on i: drive, uses a maximum of 8 threads, runs for 5 cycles, and uses SamllestFile 100MB.
Advertisements

One response

  1. Pingback: SBTools to test IOPS | ivannexus

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s