MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Tom Cunningham Date:June 23 1999 12:49am
Subject:Benchmarking my MySQL db ...
View as plain text  
I'm benchmarking a new machine to serve as an apache / mysql server. After
running the MySQL benchmarks (connect, wisconsin, etc), I've determined
that the new machine is twice as fast as the existing machine. However,
when testing a database-driven CGI on the two machines, the old machine
outperforms the new machine...

From Apache Benchmark :
			Old Machine		New Machine
Requests per second : 	1.47			.84
Processing Min		1980			1940
Processing Avg		2665			4685
Processing Max		4273			6869

I ftp'ed the .ISM, .ISD, and .frm files from the old machine onto the new
machine, so it can't be differences in the tables on the two machines. The
old machine is running Red Hat 5.2, the new machine Red Hat 6.0.
Mysql versions differ on the two machines. The old machine runs
mysql 3.22.14-gamma, while the new one runs Mysql 3.22.23b. Versions
of Perl, DBI, Apache, and mod-perl are all identical. I have noticed the
following though..

[root@newmachine /root]# /usr/local/bin/mysqladmin -u root -pnew processlist
+------+------+-----------+----+-----------+------+-------+------+
| Id   | User | Host      | db | Command   | Time | State | Info |
+------+------+-----------+----+-----------+------+-------+------+
| 1222 | root | localhost |    | Processes | 0    |       |      |
+------+------+-----------+----+-----------+------+-------+------+

[root@oldmachine ]# /usr/local/bin/mysqladmin -u root -pold processlist
+-----+--------+-----------+------------+-----------+------+-------+------+
| Id  | User   | Host      | db         | Command   | Time | State | Info
|
+-----+--------+-----------+------------+-----------+------+-------+------+
| 108 | user_x | localhost | production | Sleep     | 452  |       |
|
| 109 | user_x | localhost | production | Sleep     | 456  |       |
|
| 110 | user_x | localhost | production | Sleep     | 454  |       |
|
| 111 | user_x | localhost | production | Sleep     | 507  |       |
|
| 112 | user_x | localhost | production | Sleep     | 453  |       |
|
| 113 | user_x | localhost | production | Sleep     | 494  |       |
|
| 116 | user_x | localhost | production | Sleep     | 452  |       |
|
| 117 | user_x | localhost | production | Sleep     | 453  |       |
|
| 119 | user_x | localhost | production | Sleep     | 488  |       |
|
| 120 | user_x | localhost | production | Sleep     | 461  |       |
|
| 123 | root   | localhost |            | Processes | 0    |       |
|
+-----+--------+-----------+------------+-----------+------+-------+------+

AND

[root@newmachine /root]# ps ax | grep mysql
12205 ?        S      0:00 sh /usr/local/bin/safe_mysqld -O
key_buffer=100M
-O r
12216 ?        SN     0:00 /usr/local/libexec/mysqld --basedir=/usr/local
--data
12218 ?        SN     0:00 /usr/local/libexec/mysqld --basedir=/usr/local
--data
12219 ?        SN     0:00 /usr/local/libexec/mysqld --basedir=/usr/local
--data
16504 pts/1    S      0:00 grep mysql

[root@oldmachine] ~ 10 >> ps ax | grep mysql
13726  p0 S    0:00 sh /usr/local/bin/safe_mysqld -O key_buffer=100M -O
record_b
13737  p0 S N  0:00 /usr/local/libexec/mysqld --basedir=/usr/local/
--datadir=/u
13739  p0 S N  0:00 /usr/local/libexec/mysqld --basedir=/usr/local/
--datadir=/u
13740  p0 S N  0:00 /usr/local/libexec/mysqld --basedir=/usr/local/
--datadir=/u
13973  p0 S N  0:07 /usr/local/libexec/mysqld --basedir=/usr/local/
--datadir=/u
13974  p0 S N  0:17 /usr/local/libexec/mysqld --basedir=/usr/local/
--datadir=/u
13975  p0 S N  0:16 /usr/local/libexec/mysqld --basedir=/usr/local/
--datadir=/u
13976  p0 S N  0:03 /usr/local/libexec/mysqld --basedir=/usr/local/
--datadir=/u
13980  p0 S N  0:17 /usr/local/libexec/mysqld --basedir=/usr/local/
--datadir=/u
13981  p0 S N  0:04 /usr/local/libexec/mysqld --basedir=/usr/local/
--datadir=/u
13984  p0 S N  0:08 /usr/local/libexec/mysqld --basedir=/usr/local/
--datadir=/u
13985  p0 S N  0:09 /usr/local/libexec/mysqld --basedir=/usr/local/
--datadir=/u
13987  p0 S N  0:02 /usr/local/libexec/mysqld --basedir=/usr/local/
--datadir=/u
13988  p0 S N  0:09 /usr/local/libexec/mysqld --basedir=/usr/local/
--datadir=/u
13999  p4 S    0:00 grep mysql 

Anyone have any suggestions as to what might be the problem? I really find
it strange that the new machine can best the old machine in the
"Processing Minimum time" category, and still lose badly because of high
"Processing Maximum times". What could cause such wide varieties in query
speed? Are there setup options I can tune that might fix this? 

Thanks,

Tom

Thread
Benchmarking my MySQL db ...Tom Cunningham23 Jun
  • Re: Benchmarking my MySQL db ...Ying Zhang23 Jun