Close Menu
Rob FaulsRob Fauls
    What's Hot

    Odoo 17- Change default email address

    March 10, 2024

    Odoo 17- Automated Install on Debian 12

    December 26, 2023

    Odoo 17- Manual Install on Debian 10/Debian 11/Debian 12

    November 8, 2023
    Facebook X (Twitter) LinkedIn
    • Home
    • VMware
      • Storage
    • Odoo
    • Linux
    • About
      • About Me
      • Privacy Policy
    Rob FaulsRob Fauls
    Home » Benchmark persistent disk performance on Linux
    Linux

    Benchmark persistent disk performance on Linux

    Rob FaulsBy Rob FaulsAugust 17, 2023Updated:May 6, 2024No Comments
    Facebook Twitter LinkedIn Email Reddit Telegram
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Rob's thoughts:

    Google has provided a fantastic guide on how to use fio to benchmark persistent disk performance: Benchmarking persistent disk performance on a Linux VM

    I’ve used it a few times and while it certainly does the job, I needed a script that would do (almost) everything automatically in order to cut my time commitment each time I needed to run it on a new system. Before you use my script, please head over to Google’s documentation and make sure you understand what we’re doing.

    Script Summary:

    First, let’s go over the workflow. I won’t paste the code itself here, as it will probably change over time. I do have code comments that should help you understand where we’re doing at each step, so reference those and let me know if I’ve missed anything!

    1. Clear the screen to give us a clean slate while running the script
    2. Set colors for the console output
    3. Make sure we’re running the script as root (for the install of fio). This is not necessary to RUN the tool. If you’d like to comment out this line, you may do so, ensuring that you’ve already got fio installed.
    4. Check if fio is installed and install it if it’s missing
    5. Double check that the installation was successful and exit if it was not.
    6. Prompt user to input the directory path where fio will store the test and log files.
      • Fio will then check if the path exists and create the directory is not currently present on the system.
    7. Check available space on the storage device.
      • We want to use enough space to properly test the drive, but not so much that we exceed the drive capacity. If you have very large drives, you may elect to manually set this value, but for most systems, this should work. Drives with less than 16GB available will not be able to use this script.
    8. Run fio!
      • I’m using the variables defined in the Google documentation, with some customizations in order for the script to properly execute (FILE_SIZE and TEST_DIR).
      • Fio will execute with 16 threads for the IOPS tests.
      • While running, if you open a second connection to the host, you will see the test files and a log file named “fio_output.txt”. You may tail this file while the tests are running or simply access it when the tests are done.
      • The tests will take approximately 1 minute per test. Go grab a cup of coffee and check the log when you’re back
     

    The script:

    To access the latest version of the script, please head over to Flatiron Code. 

    You may also simply run the curl command below:

    				
    					curl https://code.flatironnetworks.com/RobFauls-Com/website-scripts/raw/branch/main/Linux/Debian/Testing/fio-testdiskspeed.sh --output disktest.sh
    				
    			

    Closing:

    While I love sharing the things that I’ve learned over time, I could use a hand, both with content ideas and help getting that content out to people. If you’ve got any ideas on what I should post up or would like to submit content that you think others will find useful, holler at me and we can start making “cool stuff” together!

    Previous ArticleInstall wkhtmltopdf on Debian12
    Next Article Upgrade Debian 11 to Debian 12

    Related Posts

    Migrate from Github to Gitea

    September 21, 2023

    Upgrade Debian 11 to Debian 12

    August 17, 2023

    Install wkhtmltopdf on Debian12

    June 16, 2023

    Gitlab Install on Debian 11 with Cloudflared and SendGrid

    January 23, 2023
    Leave A Reply Cancel Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Editors Picks
    Latest Posts

    Odoo 17- Change default email address

    March 10, 2024

    Odoo 17- Automated Install on Debian 12

    December 26, 2023

    Odoo 17- Manual Install on Debian 10/Debian 11/Debian 12

    November 8, 2023

    Subscribe to Updates

    Get the latest content from Rob.

    I've worked in IT for over 20 years, servicing Government, Healthcare, and Private Sector customers. This is a relatively new adventure into blogging, mostly out of a realization that I need to organize some of my notes on various subjects. Hopefully the articles posted will help others along the way.

    You can connect with me here:

    LinkedIn X (Twitter) Facebook

    Subscribe to Updates

    Keep up to date with new articles posted about 'stuff and things'.

    © 2025 Rob Fauls. Hosted by Flatiron Networks.
    • Home

    Type above and press Enter to search. Press Esc to cancel.