2317.1.4
by patrick crews
Updated docs for sysbench |
1 |
**********************************
|
2 |
sysbench
|
|
3 |
**********************************
|
|
4 |
||
5 |
||
6 |
||
7 |
Description
|
|
8 |
===========
|
|
9 |
dbqp's sysbench mode allows a user to run a specific iteration of a sysbench test (eg an oltp readonly run at concurrency = 16) |
|
10 |
||
11 |
||
12 |
Requirements
|
|
13 |
============
|
|
14 |
||
15 |
The SYSBENCH command requires that the Drizzle library header be installed. Simply build Drizzle and do::
|
|
16 |
||
17 |
$> sudo make install
|
|
18 |
||
19 |
This will install the right headers. |
|
20 |
||
21 |
The SYSBENCH command also requires installation of the drizzle-sysbench program, which can be installed from source like so::
|
|
22 |
||
23 |
$> bzr branch lp:~drizzle-developers/sysbench/trunk drizzle-sysbench
|
|
24 |
$> cd drizzle-sysbench
|
|
25 |
$> ./autogen.sh && ./configure && make && sudo make install
|
|
26 |
||
27 |
Make sure sysbench is then in your path |
|
28 |
||
29 |
||
30 |
sysbench / dbqp tests
|
|
31 |
=====================
|
|
32 |
||
33 |
A sysbench test defines a run for a particular concurrency. There are suites for readonly and readwrite. |
|
34 |
They are currently broken down this way as an experiment - we are open to other ways of organizing these tests::
|
|
35 |
||
36 |
[test_info]
|
|
37 |
comment = 16 threads
|
|
38 |
||
39 |
[test_command]
|
|
40 |
command = sysbench --max-time=240 --max-requests=0 --test=oltp --db-ps-mode=disable --drizzle-table-engine=innodb --oltp-read-only=on --oltp-table-size=1000000 --drizzle-mysql=on --drizzle-user=root --drizzle-db=test --drizzle-port=$MASTER_MYPORT --drizzle-host=localhost --db-driver=drizzle --num-threads=16
|
|
41 |
||
42 |
[test_servers]
|
|
43 |
servers = [[innodb.buffer-pool-size=256M innodb.log-file-size=64M innodb.log-buffer-size=8M innodb.thread-concurrency=0 innodb.additional-mem-pool-size=16M table-open-cache=4096 table-definition-cache=4096 mysql-protocol.max-connections=2048]]
|
|
44 |
||
45 |
Running tests
|
|
46 |
=========================
|
|
47 |
||
48 |
There are several different ways to run tests using :doc:`dbqp` 's sysbench mode. |
|
49 |
||
50 |
It should be noted that unless :option:`--force` is used, the program will |
|
51 |
stop execution upon encountering the first failing test. |
|
52 |
:option:`--force` is recommended if you are running several tests - it will |
|
53 |
allow you to view all successes and failures in one run. |
|
54 |
||
55 |
Running individual tests
|
|
56 |
------------------------
|
|
57 |
If one only wants to run a few, specific tests, they may do so this way::
|
|
58 |
||
59 |
./dbqp --mode=sysbench [OPTIONS] test1 [test2 ... testN]
|
|
60 |
||
61 |
Running all tests within a suite
|
|
62 |
--------------------------------
|
|
63 |
Many of the tests supplied with Drizzle are organized into suites. |
|
64 |
||
65 |
The tests within drizzle/tests/randgen_tests/main are considered the 'main' suite. |
|
66 |
Other suites are also subdirectories of drizzle/tests/randgen_tests. |
|
67 |
||
68 |
To run the tests in a specific suite::
|
|
69 |
||
70 |
./dbqp --mode=sysbench [OPTIONS] --suite=SUITENAME
|
|
71 |
||
72 |
Running specific tests within a suite
|
|
73 |
--------------------------------------
|
|
74 |
To run a specific set of tests within a suite::
|
|
75 |
||
76 |
./dbqp --mode=sysbench [OPTIONS] --suite=SUITENAME TEST1 [TEST2..TESTN]
|
|
77 |
||
78 |
Calling tests using <suitename>.<testname> currently does not work. |
|
79 |
One must specify the test suite via the :option:`--suite` option. |
|
80 |
||
81 |
||
82 |
Running all available tests
|
|
83 |
---------------------------
|
|
84 |
One would currently have to name all suites, but the majority of the working tests live in the main suite |
|
85 |
Other suites utilize more exotic server combinations and we are currently tweaking them to better integrate with the |
|
86 |
dbqp system. The slave-plugin suite does currently have a good config file for setting up simple replication setups for testing. |
|
87 |
To execute several suites' worth of tests::
|
|
88 |
||
89 |
./dbqp --mode=sysbench [OPTIONS] --suite=SUITE1, SUITE2, ...SUITEN
|
|
90 |
||
91 |
Interpreting test results
|
|
92 |
=========================
|
|
93 |
The output of the test runner is quite simple. Every test should pass. |
|
94 |
In the event of a test failure, please take the time to file a bug here: |
|
95 |
*https://bugs.launchpad.net/drizzle*
|
|
96 |
||
97 |
During a run, the program will provide the user with: |
|
98 |
* test name (suite + name) |
|
99 |
* test status (pass/fail/skipped)
|
|
100 |
* time spent executing each test
|
|
101 |
||
102 |
Example output::
|
|
103 |
||
104 |
20110601-191706 ===============================================================
|
|
105 |
20110601-191706 TEST NAME [ RESULT ] TIME (ms)
|
|
106 |
20110601-191706 ===============================================================
|
|
107 |
20110601-191706 readonly.concurrency_16 [ pass ] 240019
|
|
108 |
20110601-191706 max_req_lat_ms: 21.44
|
|
109 |
20110601-191706 rwreqps: 4208.2
|
|
110 |
20110601-191706 min_req_lat_ms: 6.31
|
|
111 |
20110601-191706 deadlocksps: 0.0
|
|
112 |
20110601-191706 tps: 150.29
|
|
113 |
20110601-191706 avg_req_lat_ms: 6.65
|
|
114 |
20110601-191706 95p_req_lat_ms: 7.02
|
|
115 |
20110601-191706 ===============================================================
|
|
116 |
20110601-191706 INFO Test execution complete in 275 seconds
|
|
117 |
20110601-191706 INFO Summary report:
|
|
118 |
20110601-191706 INFO Executed 1/1 test cases, 100.00 percent
|
|
119 |
20110601-191706 INFO STATUS: PASS, 1/1 test cases, 100.00 percent executed
|
|
120 |
20110601-191706 INFO Spent 240 / 275 seconds on: TEST(s)
|
|
121 |
20110601-191706 INFO Test execution complete
|
|
122 |
20110601-191706 INFO Stopping all running servers...
|
|
123 |