info@lasmart.biz

august 25, 2024

Disk performance

Disk performance is a critical factor for most modern applications and systems. It determines the speed at which data can be read from or written to the disk, which directly impacts the overall system performance. In this article, we will explore the key aspects of disk performance, testing methods, and optimization techniques.

Key performance metrics

1. IOPS (Input/Output Operations Per Second)

IOPS measures the number of input/output operations a device can process per second. This is a crucial performance indicator for disks.

2. THROUGHPUT

Throughput measures the amount of data that can be read or written per second, typically measured in MB/s or GB/s.

3. LATENCY

Latency refers to the time required to complete an input/output operation. It is measured in milliseconds (ms) and is an important metric for evaluating system responsiveness.

DiskSpd

One of the most popular tools for analyzing disk performance is DiskSpd.

It allows for micro-benchmarking and storage performance testing. Among its advantages is a high degree of configuration flexibility, which enables the creation of synthetic workloads for analyzing and diagnosing storage performance issues without the need to run a full workload from start to finish. DiskSpd allows various test parameters to be configured, including file size, test duration, the number of threads, and block sizes.

The utility can be used alongside other performance analysis tools, such as Performance Monitor (PerfMon) in Windows. To do this, open Performance Monitor and follow these steps:

  1. Go to the Monitoring Tools section and select Performance Monitor.
  2. Click Add (+).
  3. In the window that appears, find the PhysicalDisk section and select the metric you’re interested in (e.g., Avg Disk Queue Length).
  4. Click Add >>.
  5. Click OK.

Performance Monitor is useful for collecting additional system metrics during testing. This can aid in diagnosing bottlenecks and optimizing performance at the system level.

Tests

DiskSpd functionality allows for various types of tests, such as:

  • Random Read/Write: Simulates random read and write operations, which can be useful for modeling real-world application workloads.
  • Sequential Read/Write: Emulates sequential read and write operations, which is valuable for assessing performance when working with large files or databases.
  • Mixed Workloads: Enables the combination of different test types to more accurately represent real-world workloads.
 
To perform a disk performance test, you can use the following command:
  • -c10M: Specifies the test file size (in this case, 10 MB);
  • -d30: Test duration (30 seconds);
  • -r: Generates random read/write operations;
  • -w40: 40% of the threads will perform write operations;
  • -t4: Number of threads (in this case, 4);
  • -o32: Number of read/write requests per target thread;
  • -b4k: Block size for the file write (4 KB);
  • -Sh: Disables software and hardware caching;
  • -L: Measures latency;

Example output:

When to use DiskSpd:

  • Before deploying applications: To simulate test conditions and make preliminary performance predictions for the system.
  • Storage performance testing: To determine metrics such as throughput, latency, and IOPS under various workload conditions.

Conclusion

While DiskSpd is a powerful tool, it is best suited for straightforward scenarios and may not always accurately emulate complex workloads. However, its ease of use and functionality make it a highly valuable and sought-after tool for storage performance testing and optimization. When used in conjunction with proper preparation and data interpretation, DiskSpd can significantly aid in optimizing disk performance and the overall system efficiency.

For more information, please get in touch here:

Contact Form main