7800d49ca0a241ec149849d3a78552c80433cc87
[tridge/dbench.git] / doc / dbench.1.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <refentry id="dbench.1">
4
5 <refmeta>
6         <refentrytitle>dbench</refentrytitle>
7         <manvolnum>1</manvolnum>
8 </refmeta>
9
10
11 <refnamediv>
12         <refname>dbench</refname>
13         <refpurpose>a benchmark tool</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17         <cmdsynopsis>
18                 <command>dbench [OPTIONS] &lt;num-procs&gt;</command>
19         </cmdsynopsis>
20         
21         <cmdsynopsis>
22                 <command>dbench</command>
23                 <arg choice="opt">-B --backend=&lt;dbench backend&gt;</arg>
24                 <arg choice="opt">-c --loadfile=&lt;filename&gt;</arg>
25                 <arg choice="opt">-D --directory=&lt;string&gt;</arg>
26                 <arg choice="opt">-F --fsync</arg>
27                 <arg choice="opt">-R --target-rate=&lt;double&gt;</arg>
28                 <arg choice="opt">-s --sync</arg>
29                 <arg choice="opt">-S --sync-dir</arg>
30                 <arg choice="opt">-t --timelimit=&lt;integer&gt;</arg>
31                 <arg choice="opt">-T --tcp-options=&lt;string&gt;</arg>
32                 <arg choice="opt">--run-once</arg>
33                 <arg choice="opt">--fake-io</arg>
34                 <arg choice="opt">--server=&lt;hostname&gt;</arg>
35                 <arg choice="opt">--export=&lt;string&gt;</arg>
36                 <arg choice="opt">--protocol=&lt;string&gt;</arg>
37                 <arg choice="opt">--clients-per-process=&lt;integer&gt;</arg>
38                 <arg choice="opt">--stat-check</arg>
39                 <arg choice="opt">--skip-cleanup</arg>
40                 <arg choice="opt">--per-client-results</arg>
41
42                 <arg choice="opt">-? --help</arg>
43                 <arg choice="opt">--usage</arg>
44         </cmdsynopsis>
45         
46 </refsynopsisdiv>
47
48
49
50   <refsect1><title>DESCRIPTION</title>
51     <para>
52       dbench is a utility to benchmark a system based on client workload
53       profiles.
54     </para>
55   </refsect1>
56
57
58   <refsect1> <title>STANDARD OPTIONS</title>
59
60     <refsect2><title>-B --backend=&lt;dbench backend&gt;</title>
61       <para>
62       The backend type specifies which kind of commandset and what kind of
63       tests that dbench will perform. The backend type specifies which
64       kind of loadfile that can be used.
65       </para>
66
67       <para>
68       There are currently three types of backends : "fileio", "sockio" and "nfs". The default is "fileio" which uses a CIFS style loadfile.
69       </para>
70     </refsect2>
71
72     <refsect2><title>-c --loadfile=&lt;filename&gt;</title>
73       <para>
74       This specifies the name of the loadfile to use. The loadfile describes
75       the sequence and timing of operations that dbench will issue.
76       </para>
77     </refsect2>
78
79     <refsect2><title>-D --directory=&lt;string&gt;</title>
80       <para>
81       This controls which directory that dbench will use as the root for when
82       running the loadfile. This defaults to "." which refers to the current
83       directory for the "fileio" and "sockio" backends and the root of the
84       export for the "nfs" backend.
85       </para>
86     </refsect2>
87
88     <refsect2><title>-R --target-rate=&lt;double&gt;</title>
89       <para>
90       By default dbench will try to replay the loadfile and keep the same
91       rate as the original application the loadfile was captured from.
92       Using this option it is possible to run the load file faster/slower
93       than in the original capture.
94       </para>
95
96       <para>
97       The argument is specified in MByte/second. dbench tries to match this
98       target rate by dynamically increasing/decreasing the delays beteen
99       the inidvidual opertaions in the loadfile. These calculations only
100       take the READ and WRITE operations of the loadfile into account
101       so this may not work reliable for loadfiles with very few READ/WRITE
102       operations.
103       </para>
104
105       <para>
106       By setting this limit to something very large, such as 999999.99 you can
107       effectively tell dbench to "run this loadfile as fast as possible".
108       </para>
109
110     </refsect2>
111
112     <refsect2><title>-t --timelimit=&lt;integer&gt;</title>
113       <para>
114       How long to run the test for.
115       </para>
116     </refsect2>
117
118     <refsect2><title>--run-once</title>
119       <para>
120       Only run the loadfile once and stop when the end of the loadfile is
121       reached.
122       </para>
123       <para>
124       The default for dbench is to wrap the loadfile when the end is
125       reached and continue running the loadfile over and over until the
126       timelimit is reached.
127       </para>
128     </refsect2>
129
130     <refsect2><title>--clients-per-process=&lt;integer&gt;</title>
131       <para>
132       By default dbench will fork one child process for each client emulated.
133       Using this option dbench will run multiple emulated clients inside
134       each process.
135       </para>
136
137       <para>
138       This is useful for testing how performance differs between the case
139       of n processes with one thread of I/O each and one process with n threads
140       of I/O.
141       </para>
142     </refsect2>
143
144     <refsect2><title>--skip-cleanup</title>
145       <para>
146       Do not cleanup and delete all temporary files in the clients work
147       directory when the test ends.
148       </para>
149     </refsect2>
150
151     <refsect2><title>--per-client-results</title>
152       <para>
153       When the test is finished print a latency report for each inidvidual
154       client in addition to the aggregated report over all clients.
155       </para>
156     </refsect2>
157
158   </refsect1>
159
160   <refsect1> <title>FILEIO OPTIONS</title>
161     <refsect2><title>-F --fsync</title>
162       <para>
163       This option only apply to the "fileio" backend.
164       </para>
165
166       <para>
167       This will make dbench perform a fsync() to the file after each write
168       operation.
169       </para>
170     </refsect2>
171
172     <refsect2><title>-s --sync-open</title>
173       <para>
174       This option only apply to the "fileio" backend.
175       </para>
176
177       <para>
178       This makes dbench override the loadfile and use O_SYNC for all 
179       file open operations.
180       </para>
181     </refsect2>
182
183     <refsect2><title>-S --sync-dir</title>
184       <para>
185       This option only apply to the "fileio" backend.
186       </para>
187
188       <para>
189       Call fsync() on the directory after each "unlink", "rmdir" or "rename"
190       operation. This emulates how the linux kernel nfs daemon syncs
191       directories after performing directory modifying operations.
192       </para>
193     </refsect2>
194
195     <refsect2><title>--fake-io</title>
196       <para>
197       This option only apply to the "fileio" backend.
198       </para>
199
200       <para>
201       Do not do any file read/write operations at all.
202       </para>
203     </refsect2>
204
205     <refsect2><title>--stat-check</title>
206       <para>
207       This option only apply to the "fileio" backend.
208       </para>
209
210       <para>
211       After each create/mkdir/rmdir/rename operation, immediately try to
212       stat() the object affected and verify that the return code from stat()
213       is correct. I.e. Verify that immediately after we have created an
214       object that stat() will succeed and that immediately after we have
215       deleted an object that stat() will fail.
216       </para>
217     </refsect2>
218
219   </refsect1>
220
221   <refsect1> <title>SOCKIO OPTIONS</title>
222     <refsect2><title>-T --tcp-options=&lt;string&gt;</title>
223       <para>
224       This option only apply to the "sockio" backend.
225       </para>
226     </refsect2>
227
228
229   </refsect1>
230
231   <refsect1> <title>NFS OPTIONS</title>
232     <refsect2><title>--server=&lt;hostname&gt;</title>
233       <para>
234       This option only apply to the "nfs" backend.
235       </para>
236
237       <para>
238       This option is mandatory when the "nfs" backend is used.
239       </para>
240
241       <para>
242       This specifies the host-name or ip-address of the server to test.
243       </para>
244     </refsect2>
245
246     <refsect2><title>--export=&lt;string&gt;</title>
247       <para>
248       This option only apply to the "nfs" backend.
249       </para>
250
251       <para>
252       This option is mandatory when the "nfs" backend is used.
253       </para>
254
255       <para>
256       This specifies the nfs-export on the server to do i/o to.
257       </para>
258     </refsect2>
259
260     <refsect2><title>--protocol=&lt;string&gt;</title>
261       <para>
262       This option only apply to the "nfs" backend.
263       </para>
264
265       <para>
266       This specifies whether "tcp" or "udp" is to be used. Default is "tcp".
267       </para>
268     </refsect2>
269
270   </refsect1>
271
272   <refsect1><title>COPYRIGHT/LICENSE</title>
273 <literallayout>
274 Copyright (C) Andrew Tridgell 2008
275 Copyright (C) Ronnie Sahlberg 2008
276
277 This program is free software; you can redistribute it and/or modify
278 it under the terms of the GNU General Public License as published by
279 the Free Software Foundation; either version 3 of the License, or (at
280 your option) any later version.
281
282 This program is distributed in the hope that it will be useful, but
283 WITHOUT ANY WARRANTY; without even the implied warranty of
284 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
285 General Public License for more details.
286
287 You should have received a copy of the GNU General Public License
288 along with this program; if not, see http://www.gnu.org/licenses/.
289 </literallayout>
290   </refsect1>
291 </refentry>