Skip to content

XML profiles

Dan Lovinger edited this page Apr 17, 2026 · 2 revisions

Parameters controlling a test can be passed to DiskSpd as part of the command line or as an XML profile. This page describes how to use XML profiles for more complex test configurations.

When to use XML profiles

Using command line parameters (e.g. -w, -b8k, etc.) is easy for simple, homogeneous tests. A limitation, though, is that command line parameters apply to all targets and threads; for instance, using a different block size for different targets is not possible when command line parameters are used. Specifying the configuration of a test in an XML profile does not have this limitation. Each target is defined separately and thus can be accessed using different block sizes, offsets, strides, flags and so forth.

Using an XML-based test configuration also allows for specifying consecutive test time spans. Each time span (<Timespan>…</Timespan>) is treated as a separate test with its own independent configuration. This can be useful when a workload that changes over time is needed.

Using the -X parameter

XML run profiles are stated using the -X<path> option, where <path> is a path to an XML file defining a <Profile> compliant with the diskspd.xsd schema. The diskspd.xsd file is embedded within the diskspd.exe file.

Certain profile defaults can be overridden by direct specification on the command line alongside -X:

  • Durations: -W (warmup), -d (measurement), -C (cooldown)
  • Output: -R (result format), -v (verbosity), -z (random seed)

These are applied to all time spans in the profile.

Template target paths

Targets in XML profiles can be stated directly, as on the command line, or as template targets. Template targets are better suited for stored profiles and make XML profiles portable and reusable across different test environments.

Template targets are stated as *<number> (*1, *2, ...) instead of literal file paths. When run, target paths specified on the command line after the -X option are substituted for the template paths in order: the first target replaces *1, the second replaces *2, and so on. All template targets in a profile must be substituted and, within a profile, a template target can be reused multiple times.

Example:

diskspd -d60 -Xprof.xml first.bin second.bin

Here, first.bin will replace *1 and second.bin replaces *2 in prof.xml. All timespans will be set to run for 60 seconds of measurement as well.

Creating an XML profile with -Rp

The -Rp prefix outputs the fully resolved profile (from command line or XML input) in the specified format without running load. This is useful for:

  • converting command line parameters to their XML equivalents (-someparam -Rpxml and inspect)
  • checking complex profile's text descriptions before running them (-Xprof.xml -Rp)
  • building reusable XML profiles from command line specifications (... -Rpxml *1 *2 ...)
  • to confirm a command line before execution (... -Rp)

For example, to just get a text profile description:

diskspd -t1 -o4 -b4k -r4k -w0 -Sh -D -d60 -L -c1G -Rp

To create an XML profile with template targets:

diskspd -t1 -o4 -b4k -r4k -w0 -Sh -D -d60 -L -c1G -Rpxml *1 *2 > profile.xml

Creating an XML profile from results

The XML result output (-Rxml) contains a <Profile>…</Profile> subsection describing the test. This section can be extracted, modified as needed, and provided to the -X<path> parameter to repeat or customize a test.

Clone this wiki locally