Using Your Own Benchmarks
642
To use the benchmark suite, the following requirements must be satisfied:
• The benchmark suite is provided with MySQL source distributions. You can either download a
released distribution from
http://dev.mysql.com/downloads/
, or use the current development source
tree. (See
Section 2.17.2, “Installing MySQL from a Development Source Tree”
.)
• The benchmark scripts are written in Perl and use the Perl DBI module to access database servers,
so DBI must be installed. You also need the server-specific DBD drivers for each of the servers you
want to test. For example, to test MySQL, PostgreSQL, and DB2, you must have the
DBD::mysql
,
DBD::Pg
, and
DBD::DB2
modules installed. See
Section 2.22, “Perl Installation Notes”
.
After you obtain a MySQL source distribution, you can find the benchmark suite located in its
sql-
bench
directory. To run the benchmark tests, build MySQL, and then change location into the
sql-
bench
directory and execute the
run-all-tests
script:
shell>
cd sql-bench
shell>
perl run-all-tests --server=server_name
server_name
should be the name of one of the supported servers. To get a list of all options and
supported servers, invoke this command:
shell>
perl run-all-tests --help
The
crash-me
script also is located in the
sql-bench
directory.
crash-me
tries to determine what
features a database system supports and what its capabilities and limitations are by actually running
queries. For example, it determines:
• What data types are supported
• How many indexes are supported
• What functions are supported
• How big a query can be
• How big a
VARCHAR
column can be
For more information about benchmark results, visit http://www.mysql.com/why-mysql/benchmarks/.
8.1.4. Using Your Own Benchmarks
You should definitely benchmark your application and database to find out where the bottlenecks are.
After fixing one bottleneck (or by replacing it with a “dummy” module), you can proceed to identify the
next bottleneck. Even if the overall performance for your application currently is acceptable, you should
at least make a plan for each bottleneck and decide how to solve it if someday you really need the
extra performance.
For examples of portable benchmark programs, look at those in the MySQL benchmark suite. See
Section 8.1.3, “The MySQL Benchmark Suite”
. You can take any program from this suite and modify it
for your own needs. By doing this, you can try different solutions to your problem and test which really
is fastest for you.
Another free benchmark suite is the Open Source Database Benchmark, available at
http://
osdb.sourceforge.net/
.
It is very common for a problem to occur only when the system is very heavily loaded. We have
had many customers who contact us when they have a (tested) system in production and have
encountered load problems. In most cases, performance problems turn out to be due to issues of
basic database design (for example, table scans are not good under high load) or problems with the
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...