iSCSI supportDBENCH has a tiny iSCSI initiator built in, which allow it to log in to a iSCSI target and generate i/o. The iSCSI backend to DBENCH is activated with '-B iscsi'. iSCSI specific arguments--iscsi-target=<iqn-name>This argument specifies the iqn name of the target to connect to. --iscsi-portal=<ip address>This is the ip address of the target. --iscsi-port=<port>This is the port of the target. This defaults to 3260 if not specified. --iscsi-lun=<lun>This specifies which LUN to perform I/O to. iSCSI loadfilesThe iSCSI loadfiles supports a small subset of all SCSI commands. The current list of supported commands, their flags and their use can always be found in the file ./loadfiles/iscsi.txt Example loadfile 1# timestamp TESTUNITREADY sense 0.000 TESTUNITREADY 0x00 # # # timestamp READ10 lba #xferlen rd grp sense # if lba is * this means to use a random lba # # rd is : # 3 bits 0xe0 : RDPROTECT # 1 bit 0x10 : DPO # 1 bit 0x08 : FUA # 1 bit 0x02 : FUA_NV 0.000 READ10 0 2 0 0 0x00 0.000 READ10 2 2 0 0 0x00 0.000 READ10 4 2 0 0 0x00 0.000 READ10 6 2 0 0 0x00 0.000 READ10 * 2 0 0 0x00 # # timestamp READCAPACITY10 lba pmi(0/1) sense 0.000 READCAPACITY10 0 0 0x00 Example loadfile 2This simple loadfile just reads the same 4kb from the target over and over. This will result in serving data straight out of page-cache and can be used to test how fast the target can push data from page-cache out across the network. 0.000 READ10 0 8 0 0 0x00 Example loadfile 3This simple loadfile reads random 4kb from the target over and over. For a large LUN that can not all fit in page-cache, this would almost always generate a cache-miss and can test how fast the target can read data off stable-storeage and push it across the network. This can also measure how many threads of i/o the target has when accessing stable-storage. 0.000 READ10 * 8 0 0 0x00 Example loadfile 3Throughput test. Read the same 1Mbyte from page-cache over and over. To measure how much data the target can push to the network under the most favorable conditions. 0.000 READ10 0 2048 0 0 0x00 ExamplesExample 1Run DBENCH with 1 thread of execution and run the loadfile only once. Terminate the run once the end of the loadfile has been reached. dbench -B iscsi --loadfile=iscsi.txt --iscsi-lun=1 --iscsi-portal=10.0.0.71 --iscsi-port=3260 --iscsi-target=iqn.2007-03:mptest --warmup=0 --run-once 1 Example 2Run DBENCH for 10 seconds with 5 separate threads of execution. When the end of the loadfile is reached, go back to the start and execute it again until time runs out. dbench -B iscsi --loadfile=iscsi.txt --iscsi-lun=1 --iscsi-portal=10.0.0.71 --iscsi-port=3260 --iscsi-target=iqn.2007-03:mptest --warmup=0 --timelimit=10 5 Example outputRunning for 5 seconds with load 'iscsi.txt' and minimum warmup 0 secs 0 of 10 processes prepared for launch 0 sec 10 of 10 processes prepared for launch 0 sec releasing clients 0 2 0.00 MB/sec warmup 1 sec latency 990.887 ms 0 2 0.00 MB/sec warmup 2 sec latency 1990.978 ms 1 2 1.75 MB/sec warmup 3 sec latency 2991.106 ms 2 2 2.62 MB/sec warmup 4 sec latency 3991.251 ms 5 3 6.29 MB/sec warmup 5 sec latency 4991.359 ms 7 4 6.99 MB/sec warmup 6 sec latency 5991.386 ms 8 5 7.49 MB/sec warmup 7 sec latency 6991.471 ms 9 5 7.86 MB/sec warmup 8 sec latency 7991.582 ms 9 5 6.99 MB/sec warmup 9 sec latency 8991.672 ms 10 cleanup 10 sec 7 cleanup 11 sec 2 cleanup 12 sec 0 cleanup 12 sec Operation Count AvgLat MaxLat -------------------------------------------------- READ10 25 4495.180 9349.097 |