1-800-691-1991 | 9am - 8pm ET
EN

How to use DiskSpd to simulate Veeam Backup & Replication disk actions

KB ID: 2014
Product: Veeam Agent for Microsoft Windows
Veeam Backup & Replication
Version: All
Published: 2015-03-10
Last Modified: 2021-12-13
Languages: ES
Get weekly article updates
By subscribing, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Policy.

Cheers for trusting us with the spot in your mailbox!

Now you’re less likely to miss what’s been brewing in our knowledge base with this weekly digest

error icon

Oops! Something went wrong.

Please try again later.

Purpose

This document contains information on how to use Microsoft© DiskSpd to simulate Veeam Backup & Replication disk actions to measure disk performance.

The test file created by DiskSpd does not contain any diagnostic information and must be removed manually after testing has concluded. All diagnostic information regarding the performance test is displayed in the command line. Please do not send the testfile.dat to support, as its contents will not help with troubleshooting.

DiskSpd and additional info can be found here: https://aka.ms/diskspd

Do not send the testfile.dat to Veeam Support
The testfile.dat created by the diskspd benchmark does not contain diagnostic information.

Solution

Below are specific examples of simulations you can do to measure disk speed independently of Veeam. Please keep in mind that with all synthetic benchmarks, real-world results may differ.

A detailed guide on using DISKSPD is available from Microsoft here: Use DISKSPD to test workload storage performance

Command Parameters
diskspd [options] [target]

Target

Available targets:

  • File on a volume with an assigned letter: D:\testfile.dat
  • File on a CIFS/SMB share: \\nas\share\testfile.dat
  • File on an NFS share, provided you have mounted it to a disk letter with Client for NFS: N:\testfile.dat
  • Disk: #X where X is the number of the disk in Disk Management. You can use a local disk or one attached by iSCSI, and it does not matter if they are Online are Offline. In this mode diskspd reads or writes directly from/to the disk ("RAW").

You can specify multiple targets. This way you can simulate several jobs running at the same time.

Block size

-b specifies the size of a read or write operation.

For Veeam, this size depends on the job settings. By default, "Local" storage optimization setting is selected and this corresponds to 1MB block size in backups. However, every block of data is compressed (unless using the Decompress option) before it is written to the backup file, so the size is reduced. It is safe to assume that blocks compress on average down to half the size, so in most cases picking a 512KB block size is a good estimate.

If the job is using a different setting, WAN (256KB), LAN (512KB) or Local+ (4MB), change the -b value accordingly to 128KB, 256KB or 4MB. And if the Decompress option is on don't halve the values.

File size

-c specifies the file size you need to create for testing. We recommend calculate value properly so that it could not be easily cached by hardware and thus yield incorrect results.

Duration

-d specifies the duration of the test. By default it does 5 seconds of warm up (statistics are not collected), then 10 seconds of the test. This is OK for a short test, but for more conclusive results run the test for at least 10 minutes (-d600).

 

Caching

-Sh disables Windows and hardware caching.

This flag should always be set. VeeamAgents always explicitly disable caching for I/O operations for greater reliability, even though this results in lower speed. Windows Explorer for example, does use the Cache Manager and in a very simple copy-paste test will get greater speeds than Veeam does, due to cached reads and lazy writes. That is why using Explorer is never a valid test.

Active Full or Forward Incremental
diskspd.exe -c25G -b512K -w100 -Sh -d600 D:\testfile.dat

-w100 indicates 100% writes and 0% reads. Sequential I/O is used by default.

IMPORTANT: Contents of testfile.dat will be destroyed without a warning.

 

Synthetic Full & Merge Operations
diskspd.exe -c100G -b512K -w50 -r4K -Sh -d600 D:\testfile.dat

-w50 indicates 50% writes and 50% reads to simulate reading data from one file and writing that data into another (or in the case of transform, reading the same number of blocks from two files as are written to two other files).
-r4K enables random I/O that are 4KB aligned, for a more realistic simulation.

IMPORTANT: Contents of testfile.dat will be destroyed without a warning.

After the test has finished, take Total IO MB/s from the results and divide it by 2. This is because for every processed block Veeam needs to do 2 I/O operations, thus the effective speed is 2 times slower. 

To estimate an expected time to complete the synthetic operation, in seconds:
For synthetic full backup divide the expected size of the new full backup file (typically the same as previous full backup files) by the effective speed.
For all other synthetic operations, add the sizes of all of the incremental files which will be merged or transformed, and then divide the resulting sum by the effective speed. Typically only the oldest incremental file is merged, whereas all incremental files are transformed to rollbacks.

This benchmark cannot reproduce Fast Clone behavior.
Reverse incremental
diskspd.exe -c100G -b512K -w67 -r4K -Sh -d600 D:\testfile.dat

-w67 indicates 67% writes and 33% reads to simulate 2 writes and 1 read that happen in reverse incremental backup jobs.
-r4K enables random I/O that are 4KB aligned, for a more realistic simulation.

After the test has finished, take Total IO MB/s from the results and divide it by 3. This is because for every processed block Veeam needs to do 3 I/O operations, thus the effective speed is 3 times slower.

IMPORTANT: Contents of testfile.dat will be destroyed without a warning.

Slow restore or Surebackup
Restore performance may be impacted when restoring from deduplication appliances with sub-optimal settings. For information about dedupe storage configuration, advice please review https://vee.am/kb1745 and the user guide. As a workaround in case of slow restore, manually copy the backup files to elsewhere (e.g. Veeam server), import, and restore from there.
Worst case scenario where the backup file is heavily fragmented inside, which implies a lot of random read I/O:
diskspd.exe -b512K -r4K -Sh -d600 \\nas\share\VeeamBackups\Job\Job2014-01-23T012345.vbk
-r4K enables random I/O that are 4KB aligned, for a more realistic simulation.
Best case scenario where the backup file is not fragmented inside (no parallel processing), which implies linear read I/O: 
diskspd.exe -b512K -Sh -d600 \\nas\share\VeeamBackups\Job\Job2014-01-23T012345.vbk
In both cases you need to pick an existing .vbk file as the target. Only read operations will be performed.
Direct disk access read speed
diskspd.exe -Sh -d600 #X

Where is the number of the disk that you see in Disk Management.

This test will not overwrite data, it is a safe test, and it works for Offline disks. You can simulate and measure the maximum possible reading speed in SAN or hot-add modes. However, this will not take any VDDK overhead into account.

Note: If the command is executed from a PowerShell prompt, the target specified must be in quotes. (e.g., diskspd.exe -Sh -d600 "#2")

More information

FAQ
Q: Can diskspd be used to stress-test NAS boxes for reliability ("specified network name is no longer available" errors in Veeam)
A: Unfortunately, no. If the SMB share disappears, diskspd will just ignore that issue. It is better to use Wireshark.

Q: I am getting extremely high I/O speed like 4 GB/s in any test I try, even though I have set the -Sh flag, what's going on?
A: Most likely you're running diskspd on a Hyper-V VM, testing performance of a virtualised (.vhdx) disk, so the data is cached by the Hyper-V host. Run the test on the datastore where that .vhdx is located instead.
Click here to send feedback regarding this KB, or suggest content for a new KB.
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.

Spelling error in text

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

Oops! Something went wrong.

Please try again later.

KB Feedback/Suggestion

This form is only for KB Feedback/Suggestions, if you need help with the software open a support case

By submitting, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Policy.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Thank you for your interest in Veeam products!
We've sent a verification code to:
  • Incorrect verification code. Please try again.
An email with a verification code was just sent to
Didn't receive the code? Click to resend in sec
Didn't receive the code? Click to resend
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

error icon

Oops! Something went wrong.

Please try again later.