Test Hard Drive Performance with Diskspd on Windows 10

Test Hard Drive Performance with Diskspd on Windows 10

Understanding Hard Drive Performance Metrics

As an experienced IT professional, one of the essential tasks you may encounter is evaluating the performance of hard drives in your systems. Whether you’re troubleshooting a slow-running application, optimizing a server’s storage configuration, or simply trying to understand the capabilities of a new storage solution, having the right tools and knowledge to measure disk performance can make all the difference.

In the Windows ecosystem, one of the most powerful and versatile tools for this purpose is Diskspd, a command-line utility developed by Microsoft. Diskspd is designed to generate synthetic workloads and provide detailed insights into the input/output (I/O) performance of your storage devices, allowing you to uncover bottlenecks, compare performance characteristics, and make informed decisions about your IT infrastructure.

Introducing Diskspd

Diskspd is a robust storage performance testing tool that can be used to measure a wide range of performance metrics, including throughput, latency, and IOPS (Input/Output Operations per Second). It’s particularly useful for scenarios where the standard Windows disk performance tools, such as WinSAT or CrystalDiskMark, may not provide the level of detail or customization needed to accurately assess your storage subsystem’s capabilities.

One of the key advantages of Diskspd is its ability to simulate a variety of I/O patterns, including sequential and random reads and writes, as well as different block sizes and queue depths. This flexibility allows you to tailor the test to closely match the real-world workloads your applications are likely to encounter, providing a more accurate representation of system performance.

Preparing to Use Diskspd

To get started with Diskspd, you’ll first need to download the tool from the Microsoft GitHub repository. The download is a standalone executable, so there’s no installation required – simply extract the ZIP file to a convenient location on your system.

Once you have Diskspd, the next step is to ensure you have a suitable test file or set of files to use for the performance evaluation. Diskspd can test against existing files or create new ones on the fly, but it’s generally recommended to use a file that’s at least several gigabytes in size to ensure a robust and representative test.

If you don’t have an existing file, you can create one using the -c parameter in Diskspd. For example, the following command will create a 5GB test file named IO.dat in the C:\ClusterStorage\CSV01 directory:

diskspd -c5g C:\ClusterStorage\CSV01\IO.dat

With the test file in place, you’re ready to start exploring the performance of your storage subsystem using Diskspd.

Running Diskspd Tests

Diskspd provides a wide range of parameters that allow you to customize the test to your specific needs. Here’s an example command that you can use as a starting point:

diskspd -t2 -o32 -b4K -r4K -w0 -d120 -Suw -D -L -c5g C:\ClusterStorage\CSV01\IO.dat -o test01.txt

Let’s break down the key parameters in this command:

  • -t2: Specifies the number of threads per target/test file. In this case, we’re using two threads to stress the CPU cores.
  • -o32: Sets the number of outstanding I/O requests per target per thread, also known as the queue depth.
  • -b4K: Defines the block size for the test, in this case, 4KB.
  • -r4K: Ensures that the I/O operations are randomly aligned to a 4KB block size.
  • -w0: Indicates that the test will be 100% read operations (0% writes).
  • -d120: Sets the duration of the test to 120 seconds (2 minutes).
  • -Suw: Disables software and hardware write caching to provide more accurate results.
  • -D: Captures IOPS statistics, including standard deviation, in intervals of milliseconds.
  • -L: Measures latency statistics.
  • -c5g: Specifies a 5GB target file size for the test.
  • C:\ClusterStorage\CSV01\IO.dat: The path to the test file.
  • -o test01.txt: Directs the test output to a file named test01.txt.

When you run this command, Diskspd will perform the specified I/O operations and generate a detailed report in the test01.txt file. This report will include information about the CPU utilization, total I/O operations, throughput, and latency statistics, providing you with a comprehensive view of your storage system’s performance.

Interpreting Diskspd Results

The Diskspd output file is divided into several sections, each providing valuable insights into the performance of your storage subsystem. Let’s take a closer look at the key sections:

Input Settings

This section outlines the specific parameters used for the test, including the command-line arguments and any additional details about the test run.

CPU Utilization Details

This section provides information about the CPU usage during the test, including the total test time, the number of available processors, and the average utilization of each CPU core.

Total I/O

This section is the most important, as it presents the overall performance metrics for the test. It includes the total number of I/O operations, the average latency, the throughput in MiB/s, and the standard deviations for IOPS and latency.

Latency Percentile Analysis

The final section of the report delves into the latency percentiles, providing a detailed breakdown of the latency distribution for the test. This information can be particularly useful in understanding the “quality” of the IOPS, as it reveals how many I/O operations were able to achieve a specific latency value.

By analyzing the Diskspd output, you can gain valuable insights into the performance characteristics of your storage system, such as:

  • IOPS Capacity: Determine the maximum IOPS your storage can sustain, which is crucial for workloads that are heavily I/O-bound.
  • Throughput Limitations: Identify the maximum throughput of your storage, which is important for workloads that require high data transfer rates.
  • Latency Profiles: Understand the distribution of latency values, which can help you identify any potential bottlenecks or areas for optimization.

Considerations and Best Practices

When using Diskspd to test your storage performance, there are a few important factors to keep in mind:

  1. Alignment with Real-World Workloads: While Diskspd provides a great deal of flexibility in creating synthetic workloads, it’s essential to ensure that the test parameters closely match the actual usage patterns of your applications. This will help you obtain results that are more representative of the real-world performance you can expect.

  2. Storage Health and Variables: Before running a Diskspd test, it’s recommended to verify the health of your storage space, check resource usage to avoid interference from other programs, and prepare any necessary performance monitoring tools.

  3. Cluster Shared Volume (CSV) Ownership: If you’re testing a virtualized environment, such as Hyper-V, it’s crucial to ensure that the Diskspd test is run from the node that owns the CSV to avoid performance degradation due to network hops.

  4. Limitations of File Copy Testing: Some users may be tempted to use file copy operations as a way to measure storage performance, but this approach has significant limitations and may not provide an accurate representation of the underlying storage capabilities.

By keeping these considerations in mind and following best practices, you can ensure that your Diskspd tests provide reliable and actionable insights into the performance of your storage subsystem.

Exploring Advanced Diskspd Scenarios

While the example command we’ve provided covers a basic performance test, Diskspd offers a wide range of advanced features and scenarios that you can explore to gain deeper insights into your storage system’s capabilities.

For example, you can design tests to simulate specific workload types, such as OLTP (Online Transactional Processing) or OLAP (Online Analytical Processing), by adjusting parameters like block size, queue depth, and the ratio of reads to writes. Additionally, you can experiment with different resiliency structures, such as mirroring or parity, to understand how they impact performance.

To learn more about these advanced use cases and how to optimize your Diskspd tests, be sure to refer to the Diskspd documentation on the Microsoft Learn website and the Diskspd GitHub repository.

Conclusion

In the ever-evolving world of IT, understanding the performance characteristics of your storage subsystem is crucial for ensuring the smooth operation of your systems and applications. Diskspd, with its powerful set of features and customization options, provides IT professionals like yourself with a valuable tool for thoroughly evaluating disk performance, identifying bottlenecks, and making informed decisions about your storage infrastructure.

By leveraging Diskspd, you can gain deep insights into your storage system’s capabilities, optimize your configurations, and ultimately deliver better-performing and more reliable IT solutions to your organization. As an experienced IT professional, mastering the use of Diskspd will undoubtedly enhance your troubleshooting skills, streamline your decision-making process, and elevate your overall effectiveness in managing and maintaining your IT infrastructure.

Remember, the key to successful storage performance testing lies in understanding your specific workloads, tailoring your Diskspd tests accordingly, and interpreting the results with a keen eye for detail. With this knowledge in hand, you’ll be well-equipped to tackle even the most complex storage-related challenges and ensure that your IT systems operate at their full potential.

Facebook
Pinterest
Twitter
LinkedIn

Newsletter

Signup our newsletter to get update information, news, insight or promotions.

Latest Post