项目作者: ptr727

项目描述 :
Utility to automate iterative IO performance tests
高级语言: C#
项目地址: git://github.com/ptr727/DiskSpeedTest.git
创建时间: 2020-01-05T02:48:50Z
项目社区:https://github.com/ptr727/DiskSpeedTest

开源协议:MIT License

下载


DiskSpeedTest

Utility to automate iterative IO performance tests.

The tool includes two tests:

  • Automating iterative DiskSpd runs with varying block sizes and varying read/write ratios.
  • Recursive file create, write, read, and delete operations.

License

GitHub
Licensed under the MIT License

Project

GitHub last commit
Code is on GitHub.
CI is on Azure DevOps.

Build Status

Build Status
GitHub release (latest SemVer)

Getting Started

Installation

Configuration

  1. {
  2. // Add a timestamp to the result output filenames
  3. "timestampresultfile": false,
  4. // DiskSpeedTest config
  5. "diskspeedtest": {
  6. // Enable this test
  7. "enabled": true,
  8. // Output CSV file
  9. "resultfile": "DiskSpeedResult.csv",
  10. // Test targets, full path and filename, directory must exist, file will be created
  11. "targets": [
  12. "C:\\Temp\\DiskSpeedData.dat",
  13. "\\\\Server\\Share\\DiskSpeedData.dat"
  14. ],
  15. // File size of test target in bytes
  16. "targetsize": 68719476736,
  17. // Block size in bytes, automatically generated by doubling the beginning value until the end size is reached
  18. "blocksizebegin": 4096,
  19. "blocksizeend": 2097152,
  20. // Warmup time in seconds, do IO but don't use the values in computed results
  21. "warmuptime": 30,
  22. // Test time in seconds
  23. "testtime": 120,
  24. // Time to rest between test runs
  25. "resttime": 5
  26. },
  27. // FileIterationTest config
  28. "fileiterationtest": {
  29. // Enable this test
  30. "enabled": true,
  31. // Output CSV file
  32. "resultfile": "FileIterationResult.csv",
  33. // Test targets, full path, directory will be created, contents will be deleted
  34. "targets": [
  35. "C:\\Temp\\FileIteration",
  36. "\\\\Server\\Share\\FileIteration"
  37. ],
  38. // Folder depth for recursion
  39. "folderdepth": 2,
  40. // Folders per folder
  41. "foldersperfolder": 2,
  42. // Files per folder
  43. "filesperfolder": 1000,
  44. // File size in bytes
  45. "filesize": 65536
  46. }
  47. }

Run Tests

  1. C:\...\netcoreapp3.1>diskspeedtest.exe --help
  2. DiskSpeedTest:
  3. Utility to automate iterative IO performance tests.
  4. Usage:
  5. DiskSpeedTest [options] [command]
  6. Options:
  7. --settings <settings> (REQUIRED) Path to settings file.
  8. --version Show version information
  9. -?, -h, --help Show help and usage information
  10. Commands:
  11. writedefaults Write default values to settings file.
  12. runtests Run all tests.

Example: DiskSpeedTest.exe --settings DiskSpeedTest.json runtests.

CSV Output Files

Import the CSV results in Excel and use pivot tables for analysis.

DiskSpeedTest CSV Format

UTC, Target, FileSize, BlockSize, WriteRatio, ThreadCount, OutstandingOperations, WarmupTime, TestTime, Bytes, IOS

FileIterationTest CSV Format

UTC, Target, FileSize, FolderDepth, FoldersPerFolder, FilesPerFolder, FolderCount, FileCount, CreateTime, ReadTime, DeleteTime

Notes

  • DiskSpd can be destructive, especially when running elevated, use at your own risk.
  • DiskSpd will use privileged IO functions when running elevated. Test results will differ between running elevated or not, do not mix test results.
  • Special considerations are made for COW and compressing filesystems, like ZFS with LZ4:
    • The default DiskSpd -c command used to create test target files creates semi-sparse files on ZFS with LZ4 compression, e.g. 64GiB file is 2GiB on disk.
    • For write testing on COW filesystems there is no point in pre-filling the file as all writes are in new blocks, but the same file is used for the read tests.
    • For read testing the read should result in disk IO, not just decompression, as may happen with sparse files or highly compressible content.
    • Instead of using DiskSpd -c to create the test file, the file is created and filled with random data such that the allocated size on disk is near identical to the logical size. This will mostly eliminate the benefits of LZ4 during reads, and test actual IO.
    • The DiskSpd -Zr option is used to randomize data in every write block, this adds some test overhead, but mostly prevents LZ4 from compressing the data and writing less IO than requested.

Unraid SMB Performance

I wrote this tool to help troubleshoot poor SMB performance on Unraid, specifically concurrent writes or concurrent reads and writes.

For more details refer to my blog posts.

After many tests I came to the conclusion that the performance degradation is caused by the Unraid User Share FUSE code.
The results of various tests are included in the the repository.

DiskSpeedResult