Databases Reference
In-Depth Information
HTTP response codes:
code 200 - 48
Finally, we emulate even more load, with an incoming rate of 20 requests per second.
Notice how the connect and response times increase with the higher load:
$ http_load -rate 20 -seconds 10 urls.txt
111 fetches, 89 max parallel, 5.91142e+06 bytes, in 10.0001 seconds
53256.1 mean bytes/connection
11.0998 fetches/sec, 591134 bytes/sec
msecs/connect: 100.384 mean, 211.885 max, 38.214 min
msecs/first-response: 2163.51 mean, 7862.77 max, 933.708 min
HTTP response codes:
code 200 -- 111
MySQL Benchmark Suite
The MySQL Benchmark Suite consists of a set of Perl benchmarks, so you'll need Perl
to run them. You'll find the benchmarks in the sql-bench/ subdirectory in your MySQL
installation. On Debian GNU/Linux systems, for example, they're in /usr/share/mysql/
sql-bench/ .
Before getting started, read the included README file, which explains how to use the
suite and documents the command-line arguments. To run all the tests, use commands
like the following:
$ cd /usr/share/mysql/sql-bench/
sql-bench$ ./run-all-tests --server=mysql --user=root --log --fast
Test finished. You can find the result in:
output/RUN-mysql_fast-Linux_2.4.18_686_smp_i686
The benchmarks can take quite a while to run—perhaps over an hour, depending on
your hardware and configuration. If you give the --log command-line option, you can
monitor progress while they're running. Each test logs its results in a subdirectory
named output . Each file contains a series of timings for the operations in each bench-
mark. Here's a sample, slightly reformatted for printing:
sql-bench$ tail −5 output/select-mysql_fast-Linux_2.4.18_686_smp_i686
Time for count_distinct_group_on_key (1000:6000):
34 wallclock secs ( 0.20 usr 0.08 sys + 0.00 cusr 0.00 csys = 0.28 CPU)
Time for count_distinct_group_on_key_parts (1000:100000):
34 wallclock secs ( 0.57 usr 0.27 sys + 0.00 cusr 0.00 csys = 0.84 CPU)
Time for count_distinct_group (1000:100000):
34 wallclock secs ( 0.59 usr 0.20 sys + 0.00 cusr 0.00 csys = 0.79 CPU)
Time for count_distinct_big (100:1000000):
8 wallclock secs ( 4.22 usr 2.20 sys + 0.00 cusr 0.00 csys = 6.42 CPU)
Total time:
868 wallclock secs (33.24 usr 9.55 sys + 0.00 cusr 0.00 csys = 42.79 CPU)
As an example, the count_distinct_group_on_key (1000:6000) test took 34 wall-clock
seconds to execute. That's the total amount of time the client took to run the test. The
other values ( usr , sys , cursr , csys ) that added up to 0.28 seconds constitute the over-
head for this test. That's how much of the time was spent running the benchmark client
 
Search WWH ::




Custom Search