Trim Test

Type: Automated Test


The Trim Test verifies that a SATA device that supports Trim performs according to the Logo requirements. Trim is a Data Set Management command feature described in the ATA/ATAPI Command Set-2 (ACS-2) or later. To obtain this specification, go to the T13 Technical Committee Web site at Ee820155.internet_link_sm(en-us,MSDN.10)


The Trim Test installs a test miniport based on msahci, which provides a framework for validating hardware. The Trim Test uses this ATA Miniport Hardware Validation framework to generate and measure the effects that Trim has on device performance. When the test completes, the test miniport will be uninstalled.

This test may trim or overwrite any or all of the sectors on the test device. As a result, the data on the drive will be lost. This test must be run against a secondary SATA device running in AHCI mode.
Run Time: 30 minutes*
Log File:  minioctl.wtl
System Restart Required:  Yes
Test Category: Storage > Hard Disk Drive (HDD)
Supported operating systems for Logo or Signature testing:

  • Windows 7
  • Windows Server 2008 R2

Program:  minioctl.exe


Software Requirements

The test tool requires the following software:

  • Supported operating system (see list above)
  • Software components included with the device that is being tested

Hardware Requirements

The test tool requires the following hardware:

  • Device to be tested
  • Computer that meets the minimum software requirements
  • Windows keyboard
  • Two-button pointing device
  • Color display monitor capable of at least 1024 by 768 resolution, 32-bits per pixel, 60 Hz
  • Hard drive with a minimum of 20 GB available on partition C:
  • One or more SATA disks attached to the test system in AHCI configuration


The test tool runs on the following processor architectures:

  • x86
  • x64
  • IA64

Command Syntax

Command option Description
minioctl.exe Without any options, shows usage information.
-d [Device] Device path of disk to test (e.g. \\.\PhysicalDrive0)
-v [0|1|2] Logging verbosity: 0 – test failures only; 1 – all test results; 2 – all debugging details. The verbosity can be changed at schedule time in the DTM.
-s [Seed] Seed used for generating test cases. A seed can only be used to repro specific conditions when manually running this test.


The test writes the results to the log files minioctl.wtl and minioctl.txt. Use the log files to determine the cause of any failures.

Code Tour

File Manifest

File Location
msahci.sys [testbinroot]\nttest\driverstest\storage\wdk\ataminiport\
msahci.inf [testbinroot]\nttest\driverstest\storage\wdk\ataminiport\ [testbinroot]\nttest\driverstest\storage\wdk\ataminiport\
minioctl.exe [testbinroot]\nttest\driverstest\storage\wdk\ataminiport\

Test Assertions

Logo Requirement Assertion Description
N/A Trim Support Test: Checks to see if the SATA device supports Trim as a Data Set Management feature as defined by ACS-2, Section

If Trim is not supported, the test assertions below will not be verified.

Storage-0024, Section 3.c Trim Command Completion Performance: Verifies that the device can complete trim commands within the required time.

This assertion will generate and time a Trim (Data Set Management) command for a specified number of ranges. Currently, this process is used to verify command completion performance on commands specifying 1-512 ranges (Trimming 512 ranges uses 8 blocks of range entries as defined in by ACS-2, Section 7.10).

Storage-0024, Section 3.c Trim Command Completion Performance With IO: Verifies that the device can complete trim commands within the required time in the presence of IO.

This test uses a procedure nearly identical to the Trim Command Completion Performance test, with the modification of staggering the Trim commands in between several windows of IO.

N/A Trim Performance Degradation Test: Verifies that the Trim command does not degrade the performance of subsequent IO beyond an acceptable measurement. This test is currently experimental.

This test attempts to characterize the performance of a device for several generated patterns of IO. Then it attempts to characterize the performance of the same patterns of IO after inserting Trim commands. The focus is on identifying scenarios where the Trim command introduces performance degradation for subsequent IO, even if the Trim command completes quickly, as required in the previous test assertions.

Send feedback on this topic
Built on December 10, 2009