Brief ===== This component implements various Block session tests. All block number values are specified in terms of the underlying Block session, i.e., the start block 1024 will be at byte offset 512KiB on a 512B sector session whereas it will be at byte offset 4MiB on a 4K sector session. All size values must be given in sector size granularity and the request size must be at least as larger as the sector size. The tests can be executed consecutively and a new Block connection will be used for every test. After each test has finished the result will be printed to the LOG session and a report will be generated that contains the duration, the number of operations and the amount of bytes processed if the 'log' and 'report' attribute are set to 'yes'. If the 'stop_on_error' attribute is set, the execution stops whenever a tests failes. In addition, if the 'calculate' attribute is set, the component will calculate MiB/s and I/O operations per second for each test (this data is only meaningful in conjunction with the other information like block size and so on). The following list contains all available tests: * 'replay' executes a previously recorded Block session operation sequence. Each request is specified by a 'request' node which has the following attributes: - The 'lba' attribute specifies the logical block address where the request will start and is mandatory - The 'count' attribute specifies the number of blocks that are processed in the request and is mandatory. - The 'type' attribute specifies the kind of the request, valid values are 'read' and 'write' and is mandatory. * 'sequential' reads or writes a given amount of bytes sequentially. - The 'start' attribute specifies the logical block address where the test begins, if it is missing the first block is used. - The 'length' attribute specifies how many bytes are processed, if it is missing the whole underlying Block session starting on the given start block is used. - The 'size' attribute specifies the size of a request, if it is missing the block size of the underlying Block session is used. - The 'write' attribute specifies whether the tests writes or reads, if it is missing it defaults to reading. * 'ping_pong' reads or writes Blocks from the beginning and the end of the specified part of the Block session in an alternating fashion - The 'start' attribute specifies the logical block address where the test begins, if it is missing the first block is used. - The 'length' attribute specifies how many bytes are processed, if it is missing the whole underlying Block session starting on the given start block is used. - The 'write' attribute specifies whether the tests writes or reads, if it is missing it defaults to reading. * 'random' reads or writes random Blocks in a deterministic order that depends on the seed value of the PRNG (currently xoroshiro128+ is used). - The 'length' attribute specifies how much bytes are processed by the random test, if is missing the total length of the underlying block session are used. - The 'size' attribute specifies the size of a request, if it is missing the block size of the underlying Block session is used. - The 'write' or 'read' attribute denote how the access is done. If both attributes are specified the type of operation also depends on the PRNG. If the lowest bit is set it will be a 'write' and otherwise a 'read' access. In addition to the test specific attributes, there are generic attributes, which are supported by every test: - If the 'verbose' attribute is specified, the test will print each request to the LOG session before it will be executed. - The 'copy' attribute specifies whether the content should be copied in memory, which a typical client would do. The default is "yes". If set to "no", the payload data remains untouched, exposing the raw I/O and protocol overhead. - The 'batch' attribute specifies how many block-operation jobs are issued at once. The default value is 1, which corresponds to a sequential mode of operation. - The 'io_buffer' attribute defines the size of the I/O communication buffer for the block session. The default value is "4M". Note: all tests use a fixed sized scratch buffer of 1 (replay 4) MiB, plan the quota and request size accordingly. The 'random' test might generate overlapping request, which might trigger unstable operation with components that do not do sanity checking. Configuration ============= The following config snippet illustrates the use of the component: ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! Result output ============= There are two ways of presenting the test results, printing to a LOG session and generating a Report. LOG --- The LOG output provides one line for every test that is composed of key and value tuples: * bcount: total count of blocks * bsize: block size in bytes * bytes: total amount of bytes of all operations * duration: total duration time in milliseconds * iops: total number of I/O operatins * mibs: total throughput of the test in MiB/s * result: result of the test, either 0 (ok) or 1 (failed) * rx: number of blocks read * size: size of one request in bytes * test: name of the test * triggered number of handled I/O signals * tx: number of blocks written Since the LOG output is mainly intended for automated testing and analyzing all size values are given in bytes. The following examplary output illustrates the structure: ! finished sequential rx:32768 tx:0 bytes:134217728 size:131072 bsize:4096 duration:27 mibs:4740.740 iops:37925.925 triggered:35 result:ok Report ------ The Report output contains a node for every test and is updated continuosly during execution, i.e., new results are appended to the Report. The structure of the report mirrors the LOG output and is as follows: ! ! ! ! TODO ==== - move boilerplate code to Test_base (_block etc.) - check all range/overlap checks (_start, _end etc.) - fix report=yes (add Report support) - add req min/max/avg time - make daemon like, i.e., react upon config changes and execute tests dynamically