IDC

Veeam #1 Worldwide in
Data Recovery & Protection in 2H'22

LEARN MORE

How to Use Diskspd to Simulate Veeam Backup & Replication Disk Actions

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

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

*There have been reports that the latest version of DiskSpd may not work with Server 2012 R2 and that DiskSpd 2.0.21a should be used instead.

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

Any command that contains the -w switch must not target an actual backup file, as that would overwrite the backup file contents. You should only target a backup file when performing the listed restore performance tests.

Compatible 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. Allowing you to 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. The "Local" storage optimization setting is selected by default, corresponding to a 1MB block size in backups. However, every data block is compressed* 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 reasonable estimate.

*Except when Compression is disabled at the Job Level or the Repository Level.

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, respectively. 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 using sizes equivalent to restore points. If the files are too small, they may be cached by hardware, thus yielding 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 explicitly disable caching for I/O operations for improved reliability, even though this results in lower speed. For example, Windows Explorer uses the Cache Manager and, in a straightforward copy-paste test, will achieve greater speeds than Veeam due to cached reads and lazy writes. That is why using Explorer is never a valid test.

Simulation Examples

Each section below provides a command example of how to simulate performance for equivalent Veeam operations.

The command examples below that contain the -w switch and target a testfile.dat will write data to the target file. Those commands must not target an actual backup file, as that would overwrite the backup file contents. You should only target a backup file when performing the listed restore performance tests; those examples that demonstrate using a backup file.

Active Full / 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 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, divide the expected size, in MB, of the new full backup file (typically the same as previous full backup files) by the effective speed.
  • For Forever Forward Incremental merge operation, divide the size of the oldest incremental, in MB, by the effective speed.
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 completes, 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 warning.

Restore / Health Check /  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 elsewhere (e.g. Veeam server), import, and restore from there.
In both examples, you will target an existing .vbk file. Only read operations will be performed.
Worst case scenario

Wherein 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

Wherein 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

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: The target specified must be in quotes if the command is executed from a PowerShell prompt. (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.
To submit feedback regarding this article, please click this link: Send Article Feedback
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.

You have selected too large block!

Please try select less.

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 Notice.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Verify your email to continue your product download
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.