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-05-26
Languages: ES

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 some details on the options and some simulations you can do to measure disk speed independently of Veeam. Please keep in mind as with all synthetic benchmarks, real-world results may differ.
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.

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 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.

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.
KB ID: 2014
Product: Veeam Agent for Microsoft Windows, Veeam Backup & Replication
Version: All
Published: 2015-03-10
Last Modified: 2021-05-26
Languages: ES

Couldn't find what you were looking for?

Below you can submit an idea for a new knowledge base article.
Report a typo on this page:

Please select a spelling error or a typo on this page with your mouse and press CTRL + Enter to report this mistake to us. Thank you!

Spelling error in text

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Your report was sent to the responsible team. Our representative will contact you by email you provided.
We're working on it please try again later
Knowledge base content request
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

ty icon

Thank you!

We have received your request and our team will reach out to you shortly.

OK

error icon

Oops! Something went wrong.

Please go back try again later.