Creating IO Tests¶
Start an IO test with default parameters:
start_IO(dut)
Start an IO test with custom behaviors:
params = {
'iotype': 'Read',
'threads': 1,
'iosperthread': '300s', # 5 minutes
'seektype': 0,
}
config = {
'OnError': 'StopTest',
}
start_IO(dut, params, config)
start_IO¶
start_IO provides a wrapper around XML_API.get_vlun_start_test.
start_IO(dut, params=None, config=None, fail_type='error')
dut : XML_APIparams : dict Optionalconfig : dict Optionalfail_type : int or str Optional0 or 'pass' : Log a PASS1 or 'notify' : Log a NOTE2 or 'warn' : Log a WARNING and increment the warnings counter3 or 'error' : Log an ERROR and increment the errors counter4 or 'test' : Log an ERROR and immediately fail the entire testThe options passed in params and config closely correspond to
the settings available when starting a new IO test in the Controller/Namespace
Tests tab in the GUI.
Warning
It is highly recommended that within scripts you only start new IO tests using
start_IO instead of XML_API.get_vlun_start_test. Using start_IO
ensures that the new IO test will be tracked properly throughout script execution.
params¶
The params parameter is used to configure IO test behavior. The available
settings correspond with the parameters of get_vlun_start_test.
Where possible, values given will be converted to integers.
For many settings, users have the option to use the legacy name instead of the new name found in the XML API. Conversion to the new form will be handled automatically.
The available settings are as follows. Legacy names are listed first:
iotype test_type : The type of IO test to start.threads : The number of threads on which to perform IOsblocks : The number of blocks per IO.iosperthread ios : The number of IOs per thread. Specifies IO test duration if followed by ‘s’iosperpass pass_ios : For compare tests, the number of IOs of each type to do per pass.seektype seektype : The access type of the IO test (sequential, random, etc)opcode : The opcode to use. SCSI onlyinitiator : The initiator the test will be run on. (-1 for all)writeblocks wblocks : The number of blocks to write before skipping. Rewrite onlyskipblocks wskips : The number of blocks to skip after writing. Rewrite onlypattern : The IO pattern to execute (All 1s, 0x55AA55AA, etc)dedup_ratio dedup : The deduplication ratiocomp_ratio comp : The compression ratiodup_uniq : The duplicate uniqueness percentalignment skip_blocks :alignmentis used to specify the block alignment for each IO, or the alignment size.skip_blocksis used to specify the number of blocks to skip after each IO, or the alignment.Ifalignmentis given, it will be converted to a negative number to be passed intoskip_blocks.To use block skipping functionality, you must useskip_blocks.
seed : The randomizer seed to use for IOsstartpaused / paused : Whether to start the test in a paused statemultipath / multipath_mode : The multipath mode to useall_targets : 0 or 1. If 1, the IO test will run on all targets/controllers on the machineall_luns : 0 or 1. If 1, the IO test will run on all namespaces under the passed DUT.use_defaults : Whether to use default configuration settings (except for those specified in config)test_name or override_parameters are given they will be ignored.config is used to populate override_parametersFor a more detailed explanation of the options, see the Python API Manual here.
config¶
The options passed in this dictionary are used to construct the value passed to
override_parameters in get_vlun_start_test. These allow you to
customize how the system will manage the IO test.
For some of the options and their functionality, see the CLI User Guide (init) here.
The complete list of currently supported options is as follows:
CompareType LBAInPatterns UseVerify UseWSame UseXCopy UseCmpWr NoT10DIF
xxPROTECT PRCHK AppTag ReservedEnd ReservedStart TestLimit TestLimits
PassEndDelay GeneralTimeout TapeTimeout ReadWriteTimeout ReadTimeout WriteTimeout
VerifyTimeout CompareTimeout AbortTimeout CompareAndWriteTimeout WriteVerifyTimeout
WriteSameTimeout WriteZeroesTimeout WriteUncorrTimeout ZoneAppendTimeout UnmapTimeout
DatasetManagementTimeout XCopyTimeout TaskMgmtTimeout NoPathTimeout BusyDelay
BusyRetry Retry QueuingPolicy NVMeQueueSelect TimeoutErrorRecovery
VerifyWriteBuffer PatternInMetadata StreamIdentifier JEDECRandom ShadowThreads
CompleteReadPassAfterCompareError OnError PerfLimits Burstiness VerifyWritesMode
VerifyAtomicWrites DeallocAfterCompare TestControl TestAlertScript CheckWriteOverlap
UseZApp UseWrVer VerifyAfterWrite StopAfterErrorHandling FastExit IOsMin MBsMin LatencyLimits
MiscompareLimit OverrideNACA OverrideFUA OverrideLR OverridePattern ZoneQueueDepth
ZoneQueueDepthTimeLimit VerifyInjectedErrors ZoneAppendTimeout WriteVerifyTimeout
WriteUncorrTimeout MediaAccessTimeout BufferOffset UseNVMeSGLs
Any unknown configuration options in the dictionary will be ignored, and a WARNING will be issued.