Generate graphs based on diskspd stress tests

Generate graphs based on diskspd stress tests


Before moving forward be sure to have read this previous post that is the basis for the current post.

This is the link to me GitHub diskspd project containing the relevant files discussed in these 2 blog posts mini serious.

Working quiet often with diskspd it was only natural for me to automate the tiring process of manually generating graphs based on diskspd output which can be in either of this 2 formats: plain text or xml. Luckily, I run into this brilliant Powershell script by David Klee that outputs diskspd results to a csv formatted file making further analysis easier.

In this post I share 2 bits of code:

  1. A Python script named disksdp_graph_generator.py that accepts a csv file as an input parameter and generates an xls file as an output
    1. The generated xls file contains 4 graphs based on the values in the input csv file
      • IOps (the number of read and write operations per second)
      • Throughput (the data transfer rate to and from the storage media in mb per second)
      • CPU Usage
      • Disk Letancy
  2. A Powershell script named GenerateDiskdpdGraphs.ps1 that uses the above mentioned Python script to fully automate the process.
    1. When using the Python script you will get the beautiful disk performance graph generated for you thus saving you the hassle to do it manually but you still have to copy past the csv file as an input to the Python script and while this is OK for a single file it can still become tiring for multiple files and this is where this ps script comes in to the rescue.

When using the Python script:

    1. Locate the csv file at the working folder (the folder where the Python script file is located)
    2. Run the Python script
    3. Copy paste the file full name as an input and hit the Enter key on your keyboard.

The expected result is a new file to be created at the same folder where the csv file resides but with an xls file extension.

Python console

When using the Powershell script:

  1. Assign a value to the 3 input parameters
    • Full path to the Python script disksdp_graph_generator.py
    • Full path to your python.exe file (you can see I use 3.6 not sure about computability of other versions )
    • Path to a folder that contains csv file(s) to process

powershell parameters_2

The generated xls graph looks like this

  • Note that each of the IO graphs show results for different data access patterns/methods
    • Read Random
    • Read Sequential
    • Write Random
    • Write Sequential


diskspd_results_graph_2


You may like these posts showing disk stress tests for the Azure VM drives

https://www.linkedin.com/pulse/azure-vm-disk-stress-tests-p30-premium-ssd-drive-yaniv-etrogi/?trk=read_related_article-card_title

https://www.linkedin.com/pulse/azure-vm-disk-stress-tests-comparison-different-premium-yaniv-etrogi/

https://www.linkedin.com/pulse/azure-vm-disk-stress-tests-temporary-storage-d-drive-yaniv-etrogi/

The following two tabs change content below.
Yaniv Etrogi is an SQL Server consultant. He loves SQL Server and he is passionate about Performance Tuning, Automation and Monitoring.

Leave a Comment

Your email address will not be published. Required fields are marked *