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:
- 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
- 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
- A Powershell script named GenerateDiskdpdGraphs.ps1 that uses the above mentioned Python script to fully automate the process.
- 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:
- Locate the csv file at the working folder (the folder where the Python script file is located)
- Run the Python script
- 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.
When using the Powershell script:
- 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
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
You may like these posts showing disk stress tests for the Azure VM drives
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/
Latest posts by Yaniv Etrogi (see all)
- Monitor AlwaysOn Availabilty Groups - July 6, 2023
- SQL Server – The secret index syntax - February 8, 2023
- Use .net SqlClient with Powershell to access data - January 25, 2023
- Use Powershell to find unused resources in Azure - August 5, 2022
Hi Yaniv,
highly appreciate your efforts you put into this. When looking at the graphs, what do the numbers on the x-axis represent, e.g. [0,21,3]?
regards,
Marcel