Expand Minimize

Trim Performance Test

This test evaluates the performance of the trim command.

Test details


Associated requirements


See the device hardware requirements.


Windows RT (ARM-based)
Windows 8 (x64)
Windows 8 (x86)
Windows Server 2012 (x64)
Windows RT 8.1
Windows 8.1 x64
Windows 8.1 x86
Windows Server 2012 R2

Expected run time

~180 minutes





Running the test

Before you run the test, complete the test setup as described in the test requirements: Hard Disk Drive Testing Prerequisites.

The device supporting trim must be attached to the appropriate controller. The job will prepare the disk with the correct partition and formatting for the testing. The test is destructive and therefore the disk cannot be the boot drive. Also, since the test logs large amounts of data, ensure that there is a separate drive available to be used as the logger drive. The test will automatically pick the logging drive. It is important to minimize the amount of activity occurring on the drive outside of the logo test. Since this is a performance test, outside activity may affect the results. Additionally, preconditioning the drive by writing data to fill up the drive before starting the test may give more consistent results. This is dependent on the drives implementation and may not be advantageous to all drives.


  • Check WTT Trace

    • View Task Log of Run Trim Performance Test.

    • Open the log file TrimPerf.wtl.

    • Check for messages that may solve the issue.

    • Copy the .wtl log file. This is the WTT trace described in the WTT Trace section.

  • Check launched command results

    • Browse Job Logs of Trim Performance Test (LOGO).

    • Open the LaunchCommand.result.

    • If the error is related to launching a process, determine why logman or tracerpt failed.

  • No metrics found

    • The test depends on Storport ETW tracing being enabled in order to get the command completion metrics. See the ETW Trace section for more information about enabling this tracing.

    • Ensure no other Storport ETW traces are currently logging. Only one Storport ETW trace can be active at a time.

  • If you get the error message “The test drive does not support trim”, try the following:

    • Ensure that the SATA SSD’s IDENTIFY DEVICE data word 169 bit 0 is set to one.

    • Try to send a Trim command via DATA SET MANAGEMENT.

    • Run the test again.

  • If the test failed because the read and write maximum latency exceeded 500 milliseconds, try the following:

    • Check the IO latency without Trim. Try to lower the latency below 500 milliseconds.

    • Check the IO latency with presence of Trim. Try to lower the latency below 500 milliseconds.

  • If you want to debug the failure by running particular test cases, you may try the following command line options:

    • Display all the test cases with numbers: TrimPerf.exe /DriveNumber [StorageDriveNumber] /LogDriveLetter [LoggerDriveLetter]: /DeviceType StorConsumer /PrintTestCaseName

    • Run particular test case by test case number: TrimPerf.exe /DriveNumber [StorageDriveNumber] /LogDriveLetter [LoggerDriveLetter]: /DeviceType StorConsumer /Precondition F /TestCase [TestCaseNumber]

  • If you want to debug the failure by running particular pure Trim scenario, you may try the following command line options:

    • The binary has unit test options: TrimPerf.exe /DriveNumber [StorageDriveNumber] /LogDriveLetter [LoggerDriveLetter]: /DeviceType StorConsumer /Precondition F /UnitTest T /RangeCount [NumberOfRangesPerTrim] /SizeCount [SizeOfEachRange] /SizeUnit Sector /TrimCount [NumberOfTrims]

    • /RangeCount: The number of ranges per Trim command

    • /SizeCount: The size of each range in /SizeUnit

    • /SizeUnit: The granularity of /SizeCount, for SATA SSD, the granularity is sector.

    • /TrimCount: The number of Trims sent in the test case.

  • If you want to debug the failure faster, try disable the preconditioning (fill up the drive to 90% full, takes long time) by adding /Precondition F parameter as follows:

    • TrimPerf.exe /DriveNumber [StorageDriveNumber] /LogDriveLetter [LoggerDriveLetter]: /DeviceType StorConsumer /Scenario Performance /DiskSize 0 /Cooldown 2 /Precondition F

For more troubleshooting information, see Troubleshooting Device.Storage Testing.

More information

The job takes in the device instance ID of the device under test and converts the device instance ID to a physical drive number. The job partitions and formats the drive to get it into the configuration needed for testing. The test will run through a series of test cases each mapped to items in the requirements. The test cases are self-contained and are run sequentially. A list of test cases can be obtained by using the PrintTestCaseName command line option with the appropriate device specified. Each of these test cases can be run on the command line using the test in standalone mode for further testing or debugging.

The Trim Performance test stores a policy table defining for each type of device what performance tests are to be run and what the appropriate metrics should be. Once the appropriate items in the table are selected, the test will sequentially spawn threads defined in the table for that device. Each thread will execute according to the parameters specified in the table. Once the stop conditions for each of the threads has been satisfied, the threads will stop execution and the results will be parsed to generate the pass/fail logs.

The test generates large performance logs and in order to not affect the performance of the drive being tested, these logs are written to a separate drive. The drive is automatically chosen by the job, but can alternatively be specified on the command line

The test commands are as follows:

Trim command

All trim commands should be completed in less than 500 milliseconds.

IO command (with Trim sending at same time)

  • All read and write commands complete in less than 500 milliseconds.

  • 98.5% of I/O commands complete in less than 100 milliseconds.



Parameter Description


The driver number of the SATA SSD in which to run the test.

Example: 2


The drive letter of the disk to store the logs.

Example: E


The type of device under test.

Default value: StorConsumer


The operation for the test.

Default value: Performance


The part of the disk to run the test on. If this parameter is 0, the test will run on the entire disk size.

Default value: 0


The cool down time in seconds between test cases.

Default value: 2

Command syntax


Command option Description

TrimPerf.exe /DriveNumber [StorageDriveNumber] /LogDriveLetter [LogDriveLetter]: /DeviceType StorConsumer /Scenario Performance /DiskSize 0 /Cooldown 2

Runs the test.

For command-line help for this test binary, type /h.

File list


File Location









© 2015 Microsoft