1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
|
'\" t
.\" Title: \fBmysql-stress-test.pl\fR
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 03/31/2010
.\" Manual: MySQL Database System
.\" Source: MySQL
.\" Language: English
.\"
.TH "\FBMYSQL\-STRESS\-TE" "1" "03/31/2010" "MySQL" "MySQL Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.\" mysql-stress-test.pl
.SH "NAME"
mysql-stress-test.pl \- server stress test program
.SH "SYNOPSIS"
.HP \w'\fBmysql\-stress\-test\&.pl\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
\fBmysql\-stress\-test\&.pl [\fR\fB\fIoptions\fR\fR\fB]\fR
.SH "DESCRIPTION"
.PP
The
\fBmysql\-stress\-test\&.pl\fR
Perl script performs stress\-testing of the MySQL server\&. (MySQL 5\&.0 and up only)
.PP
\fBmysql\-stress\-test\&.pl\fR
requires a version of Perl that has been built with threads support\&.
.PP
Invoke
\fBmysql\-stress\-test\&.pl\fR
like this:
.sp
.if n \{\
.RS 4
.\}
.nf
shell> \fBmysql\-stress\-test\&.pl [\fR\fB\fIoptions\fR\fR\fB]\fR
.fi
.if n \{\
.RE
.\}
.PP
\fBmysql\-stress\-test\&.pl\fR
supports the following options:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: help option
.\" help option: mysql-stress-test.pl
\fB\-\-help\fR
.sp
Display a help message and exit\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: abort-on-error option
.\" abort-on-error option: mysql-stress-test.pl
\fB\-\-abort\-on\-error=\fR\fB\fIN\fR\fR
.sp
Causes the program to abort if an error with severity less than or equal to N was encountered\&. Set to 1 to abort on any error\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: check-tests-file option
.\" check-tests-file option: mysql-stress-test.pl
\fB\-\-check\-tests\-file\fR
.sp
Periodically check the file that lists the tests to be run\&. If it has been modified, reread the file\&. This can be useful if you update the list of tests to be run during a stress test\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: cleanup option
.\" cleanup option: mysql-stress-test.pl
\fB\-\-cleanup\fR
.sp
Force cleanup of the working directory\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: log-error-details option
.\" log-error-details option: mysql-stress-test.pl
\fB\-\-log\-error\-details\fR
.sp
Log error details in the global error log file\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: loop-count option
.\" loop-count option: mysql-stress-test.pl
\fB\-\-loop\-count=\fR\fB\fIN\fR\fR
.sp
In sequential test mode, the number of loops to execute before exiting\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: mysqltest option
.\" mysqltest option: mysql-stress-test.pl
\fB\-\-mysqltest=\fR\fB\fIpath\fR\fR
.sp
The path name to the
\fBmysqltest\fR
program\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: server-database option
.\" server-database option: mysql-stress-test.pl
\fB\-\-server\-database=\fR\fB\fIdb_name\fR\fR
.sp
The database to use for the tests\&. The default is
test\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: server-host option
.\" server-host option: mysql-stress-test.pl
\fB\-\-server\-host=\fR\fB\fIhost_name\fR\fR
.sp
The host name of the local host to use for making a TCP/IP connection to the local server\&. By default, the connection is made to
localhost
using a Unix socket file\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: server-logs-dir option
.\" server-logs-dir option: mysql-stress-test.pl
\fB\-\-server\-logs\-dir=\fR\fB\fIpath\fR\fR
.sp
This option is required\&.
\fIpath\fR
is the directory where all client session logs will be stored\&. Usually this is the shared directory that is associated with the server used for testing\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: server-password option
.\" server-password option: mysql-stress-test.pl
\fB\-\-server\-password=\fR\fB\fIpassword\fR\fR
.sp
The password to use when connecting to the server\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: server-port option
.\" server-port option: mysql-stress-test.pl
\fB\-\-server\-port=\fR\fB\fIport_num\fR\fR
.sp
The TCP/IP port number to use for connecting to the server\&. The default is 3306\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: server-socket option
.\" server-socket option: mysql-stress-test.pl
\fB\-\-server\-socket=\fR\fB\fIfile_name\fR\fR
.sp
For connections to
localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use\&. The default if
/tmp/mysql\&.sock\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: server-user option
.\" server-user option: mysql-stress-test.pl
\fB\-\-server\-user=\fR\fB\fIuser_name\fR\fR
.sp
The MySQL user name to use when connecting to the server\&. The default is
root\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: sleep-time option
.\" sleep-time option: mysql-stress-test.pl
\fB\-\-sleep\-time=\fR\fB\fIN\fR\fR
.sp
The delay in seconds between test executions\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: stress-basedir option
.\" stress-basedir option: mysql-stress-test.pl
\fB\-\-stress\-basedir=\fR\fB\fIpath\fR\fR
.sp
This option is required\&.
\fIpath\fR
is the working directory for the test run\&. It is used as the temporary location for result tracking during testing\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: stress-datadir option
.\" stress-datadir option: mysql-stress-test.pl
\fB\-\-stress\-datadir=\fR\fB\fIpath\fR\fR
.sp
The directory of data files to be used during testing\&. The default location is the
data
directory under the location given by the
\fB\-\-stress\-suite\-basedir\fR
option\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: stress-init-file option
.\" stress-init-file option: mysql-stress-test.pl
\fB\-\-stress\-init\-file[=\fR\fB\fIpath\fR\fR\fB]\fR
.sp
\fIfile_name\fR
is the location of the file that contains the list of tests to be run once to initialize the database for the testing\&. If missing, the default file is
stress_init\&.txt
in the test suite directory\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: stress-mode option
.\" stress-mode option: mysql-stress-test.pl
\fB\-\-stress\-mode=\fR\fB\fImode\fR\fR
.sp
This option indicates the test order in stress\-test mode\&. The
\fImode\fR
value is either
random
to select tests in random order or
seq
to run tests in each thread in the order specified in the test list file\&. The default mode is
random\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: stress-suite-basedir option
.\" stress-suite-basedir option: mysql-stress-test.pl
\fB\-\-stress\-suite\-basedir=\fR\fB\fIpath\fR\fR
.sp
This option is required\&.
\fIpath\fR
is the directory that has the
t
and
\fIr\fR
subdirectories containing the test case and result files\&. This directory is also the default location of the
stress\-test\&.txt
file that contains the list of tests\&. (A different location can be specified with the
\fB\-\-stress\-tests\-file\fR
option\&.)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: stress-tests-file option
.\" stress-tests-file option: mysql-stress-test.pl
\fB\-\-stress\-tests\-file[=\fR\fB\fIfile_name\fR\fR\fB]\fR
.sp
Use this option to run the stress tests\&.
\fIfile_name\fR
is the location of the file that contains the list of tests\&. If
\fIfile_name\fR
is omitted, the default file is
stress\-test\&.txt
in the stress suite directory\&. (See
\fB\-\-stress\-suite\-basedir\fR\&.)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: suite option
.\" suite option: mysql-stress-test.pl
\fB\-\-suite=\fR\fB\fIsuite_name\fR\fR
.sp
Run the named test suite\&. The default name is
main
(the regular test suite located in the
mysql\-test
directory)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: test-count option
.\" test-count option: mysql-stress-test.pl
\fB\-\-test\-count=\fR\fB\fIN\fR\fR
.sp
The number of tests to execute before exiting\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: test-duration option
.\" test-duration option: mysql-stress-test.pl
\fB\-\-test\-duration=\fR\fB\fIN\fR\fR
.sp
The duration of stress testing in seconds\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: threads option
.\" threads option: mysql-stress-test.pl
\fB\-\-threads=\fR\fB\fIN\fR\fR
.sp
The number of threads\&. The default is 1\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-stress-test.pl: verbose option
.\" verbose option: mysql-stress-test.pl
\fB\-\-verbose\fR
.sp
Verbose mode\&. Print more information about what the program does\&.
.RE
.SH "COPYRIGHT"
.br
.PP
Copyright \(co 2007, 2010, Oracle and/or its affiliates. All rights reserved.
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
.PP
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MySQL Reference Manual,
which may already be installed locally and which is also available
online at http://dev.mysql.com/doc/.
.SH AUTHOR
Sun Microsystems, Inc. (http://www.mysql.com/).
|