my.cnf(5.5和5.1相同):
back_log=200
max_connections=512
max_connect_errors=999999
key_buffer=512M
max_allowed_packet=8M
table_cache=512
sort_buffer=8M
read_buffer_size=8M
thread_cache=8
thread_concurrency=4
myisam_sort_buffer_size=128M
interactive_timeout=28800
wait_timeout=7200
MySQL 5.5:
..mysql5.5/bin/mysqlslap -a --concurrency=10 --number-of-queries 5000
--iterations=5 -S /tmp/mysql_5.5.sock --engine=innodb
Benchmark
Running for engine innodb
Average number of seconds to run all queries: 15.156 seconds
Minimum number of seconds to run all queries: 15.031 seconds
Maximum number of seconds to run all queries: 15.296 seconds
Number of clients running queries: 10
Average number of queries per client: 500
mysql5.1:
..mysql5.5/bin/mysqlslap -a --concurrency=10 --number-of-queries 5000
--iterations=5 -S /tmp/mysql_5.1.sock --engine=innodb
Benchmark
Running for engine innodb
Average number of seconds to run all queries: 13.252 seconds
Minimum number of seconds to run all queries: 13.019 seconds
Maximum number of seconds to run all queries: 13.480 seconds
Number of clients running queries: 10
Average number of queries per client: 500
为什么mysql 5.5比5.1慢?
BTW:我试过mysql5.5/bin/mysqlslap
和mysql5.1/bin/mysqlslap
,结果是一样的
5
基准运行1秒?这是在开玩笑吗?
您的my.cnf配置MyISAM,但基准测试使用InnoDB。抱歉,这仍然是个玩笑(如果您不更改InnoDB的默认值,那么也是这样)
—
Laurynas Biveinis 2011年
我的my.cnf文件中没有看到InnoDB的任何调整。针对默认配置的基准测试是无用的,而持续时间短的基准测试也是无用的。
—
亚伦·布朗