add a web page for iscsi
[tridge/dbench.git] / web / iscsi-loadfiles.html
1 <!--#set var="TITLE" value="NFS loadfiles" -->
2 <!--#include virtual="header.html" -->
3
4 <H1 align="center">iSCSI support</h1>
5 <p>
6 DBENCH has a tiny iSCSI initiator built in, which allow it to log in to a iSCSI target and generate i/o.
7 </p>
8 <p>
9 The iSCSI backend to DBENCH is activated with '-B iscsi'.
10 </p>
11
12 <H2>iSCSI specific arguments</h2>
13 <H3>--iscsi-target=&lt;iqn-name&gt;</h3>
14 <p>
15 This argument specifies the iqn name of the target to connect to.
16 </p>
17 <H3>--iscsi-portal=&lt;ip address&gt;</h3>
18 <p>
19 This is the ip address of the target.
20 </p>
21 <H3>--iscsi-port=&lt;port&gt;</h3>
22 <p>
23 This is the port of the target. This defaults to 3260 if not specified.
24 </p>
25 <H3>--iscsi-lun=&lt;lun&gt;</h3>
26 <p>
27 This specifies which LUN to perform I/O to.
28 </p>
29
30
31 <H2>iSCSI loadfiles</h2>
32 <p>
33 The iSCSI loadfiles supports a small subset of all SCSI commands.
34 The current list of supported commands, their flags and their use can always
35 be found in the file <a href="/loadfiles/iscsi.txt">./loadfiles/iscsi.txt</a>
36 </p>
37
38
39 <H3>Example loadfile 1</h3>
40 <pre>
41 # timestamp TESTUNITREADY sense
42 0.000 TESTUNITREADY 0x00
43 #
44 #
45 # timestamp READ10 lba #xferlen rd grp sense
46 #   if lba is * this means to use a random lba
47 #
48 #   rd is :
49 #     3 bits     0xe0 : RDPROTECT
50 #     1 bit      0x10 : DPO
51 #     1 bit      0x08 : FUA
52 #     1 bit      0x02 : FUA_NV
53 0.000 READ10    0 2 0 0 0x00
54 0.000 READ10    2 2 0 0 0x00
55 0.000 READ10    4 2 0 0 0x00
56 0.000 READ10    6 2 0 0 0x00
57 0.000 READ10    * 2 0 0 0x00
58 #
59 # timestamp READCAPACITY10 lba pmi(0/1) sense
60 0.000 READCAPACITY10 0 0 0x00
61 </pre>
62
63 <H3>Example loadfile 2</h3>
64 <p>
65 This simple loadfile just reads the same 4kb from the target over and over.
66 This will result in serving data straight out of page-cache and can be used
67 to test how fast the target can push data from page-cache out across the network.
68 </p>
69 <pre>
70 0.000 READ10 0 4 0 0 0x00
71 </pre>
72
73 <H3>Example loadfile 3</h3>
74 <p>
75 This simple loadfile reads random 4kb from the target over and over.
76 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.
77 </p>
78 <pre>
79 0.000 READ10 * 4 0 0 0x00
80 </pre>
81
82 <H3>Example loadfile 3</h3>
83 <p>
84 Throughput 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.
85 </p>
86 <pre>
87 0.000 READ10 0 2048 0 0 0x00
88 </pre>
89
90
91 <H2>Examples</h2>
92
93 <H3>Example 1</h3>
94 <p>
95 Run DBENCH with 1 thread of execution and run the loadfile only once. Terminate the run once the end of the loadfile has been reached.
96 </p>
97 <pre>
98 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
99 </pre>
100
101 <H3>Example 2</h3>
102 <p>
103 Run 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.
104 </p>
105 <pre>
106 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
107 </pre>
108
109 <H2>Example output</h2>
110 <pre>
111 Running for 5 seconds with load 'iscsi.txt' and minimum warmup 0 secs
112 0 of 10 processes prepared for launch   0 sec
113 10 of 10 processes prepared for launch   0 sec
114 releasing clients
115    0         2     0.00 MB/sec  warmup   1 sec  latency 990.887 ms
116    0         2     0.00 MB/sec  warmup   2 sec  latency 1990.978 ms
117    1         2     1.75 MB/sec  warmup   3 sec  latency 2991.106 ms
118    2         2     2.62 MB/sec  warmup   4 sec  latency 3991.251 ms
119    5         3     6.29 MB/sec  warmup   5 sec  latency 4991.359 ms
120    7         4     6.99 MB/sec  warmup   6 sec  latency 5991.386 ms
121    8         5     7.49 MB/sec  warmup   7 sec  latency 6991.471 ms
122    9         5     7.86 MB/sec  warmup   8 sec  latency 7991.582 ms
123    9         5     6.99 MB/sec  warmup   9 sec  latency 8991.672 ms
124   10  cleanup  10 sec
125    7  cleanup  11 sec
126    2  cleanup  12 sec
127    0  cleanup  12 sec
128
129  Operation                Count    AvgLat    MaxLat
130  --------------------------------------------------
131  READ10                      25  4495.180  9349.097
132 </pre>
133
134
135 <!--#include virtual="footer.html" -->
136