1. 설치
# rpm -ivh MySQL-devel-xxxxxx.rpm
# rpm -ivh MySQL-shared-xxxxxx.rpm
# rpm -ivh MySQL-shared-compat-xxxxxx.rpm
# yum -y install perl-DBD-MySQL
# yum -y install perl-DBI
# yum -y install mysql-bench
2. 사용
# cd /usr/share/sql-bench
# perl run-all-tests --dir=/download/bench_output --server=mysql --host=localhost --machine=MySQLBench_CentOS5.6 --user=root --password=root --threads=10 --connect-option=mysql_read_default_file=/etc/my.cnf --log
【옵션 설명】
All benchmarks takes the following options:
All benchmarks takes the following options:
--comments
Add a comment to the benchmark output. Comments should contain
extra information that 'uname -a' doesn't give and if the database was
stared with some specific, non default, options.
--cmp=server[,server...]
Run the test with limits from the given servers. If you run all servers
with the same --cmp, you will get a test that is comparable between
the different sql servers.
--create-options=#
Extra argument to all create statements. If you for example want to
create all MySQL tables as BDB tables use:
--create-options=ENGINE=BDB
--database (Default test)
In which database the test tables are created.
--debug
This is a test specific option that is only used when debugging a test.
Print out debugging information.
--dir (Default output)
Option to 'run-all-tests' to where the test results should be stored.
--fast
Allow the database to use non standard ANSI SQL commands to make the
test go faster.
--fast-insert
Use "insert into table_name values(...)" instead of
"insert into table_name (....) values(...)"
If the database supports it, some tests uses multiple value lists.
--field-count
This is a test specific option that is only used when debugging a test.
This usually means how many fields there should be in the test table.
--force
This is a test specific option that is only used when debugging a test.
Continue the test even if there is some error.
Delete tables before creating new ones.
--groups (Default )
This is a test specific option that is only used when debugging a test.
This usually means how many different groups there should be in the test.
--lock-tables
Allow the database to use table locking to get more speed.
--log
Option to 'run-all-tests' to save the result to the '--dir' directory.
--loop-count (Default )
This is a test specific option that is only used when debugging a test.
This usually means how many times times each test loop is executed.
--help
Shows this help
--host='host name' (Default localhost)
Host name where the database server is located.
--machine="machine or os_name"
The machine/os name that is added to the benchmark output filename.
The default is the OS name + version.
--odbc
Use the ODBC DBI driver to connect to the database.
--password='password'
Password for the current user.
--socket='socket'
If the database supports connecting through a Unix socket,
then use this socket to connect
--regions
This is a test specific option that is only used when debugging a test.
This usually means how AND levels should be tested.
--old-headers
Get the old benchmark headers from the old RUN- file.
--server='server name' (Default mysql)
Run the test on the given SQL server.
Known servers names are: Access, Adabas, AdabasD, Empress, Oracle,
Informix, DB2, mSQL, MS-SQL, MySQL, Pg, Solid and Sybase
--silent
Don't print info about the server when starting test.
--skip-delete
This is a test specific option that is only used when debugging a test.
This will keep the test tables after the test is run.
--skip-test=test1[,test2,...]
For run-all-programs; Don't execute the named tests.
--small-test
This runs some tests with smaller limits to get a faster test.
Can be used if you just want to verify that the database works, but
don't have time to run a full test.
--small-tables
This runs some tests that generate big tables with fewer rows.
This can be used with databases that can't handle that many rows
because of pre-sized partitions.
--suffix (Default )
The suffix that is added to the database name in the benchmark output
filename. This can be used to run the benchmark multiple times with
different server options without overwritten old files.
When using --fast the suffix is automaticly set to '_fast'.
--random
Inform test suite that we are generate random inital values for sequence of
test executions. It should be used for imitation of real conditions.
--threads=# (Default 5)
Number of threads for multi-user benchmarks.
--tcpip
Inform test suite that we are using TCP/IP to connect to the server. In
this case we can do many new connections in a row as we in this case may
fill the TCP/IP stack
--time-limit (Default 600)
How long a test loop is allowed to take, in seconds, before the end result
is 'estimated'.
--use-old-results
Option to 'run-all-tests' to use the old results from the '--dir' directory
instead of running the tests.
--user='user_name'
User name to log into the SQL server.
--verbose
This is a test specific option that is only used when debugging a test.
Print more information about what is going on.
--optimization='some comments'
Add coments about optimization of DBMS, which was done before the test.
--hw='some comments'
Add coments about hardware used for this test.
--connect-options='some connect options'
Add options, which uses at DBI connect.
For example --connect-options=mysql_read_default_file=/etc/my.cnf.
댓글 없음:
댓글 쓰기