Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

my.cnf (5.5 and 5.1 is the same) :

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

Why mysql 5.5 slower than 5.1 ?

BTW:I'm tried mysql5.5/bin/mysqlslap and mysql5.1/bin/mysqlslap,result is the same

share|improve this question

migrated from serverfault.com Nov 24 '11 at 20:27

This question came from our site for professional system and network administrators.

5  
A benchmark that runs for 1 second? Is this some kind of joke? –  pfo Nov 24 '11 at 16:59
    
@pfo ,I change to: --concurrency=10 --number-of-queries 5000 –  Zenofo Nov 24 '11 at 17:35
1  
Your my.cnf configures MyISAM but benchmarks use InnoDB. I am sorry, this is still a joke (and so are InnoDB defaults if you don't change them) –  Laurynas Biveinis Nov 25 '11 at 9:08
2  
I don't see any tuning for InnoDB in your my.cnf. A benchmark against default the configuration is useless and a benchmark of this short a duration is useless, also. –  Aaron Brown Nov 25 '11 at 16:42

1 Answer 1

up vote 5 down vote accepted

You may find this surprising, but MySQL 5.1 may outperform MySQL 5.5 under certain circumstances.

Percona performed a bake-off among multiple releases of MySQL

  • MySQL 4.1
  • MySQL 5.0
  • MySQL 5.1 (with built-in InnoDB)
  • MySQL 5.1 with InnoDB-plugin
  • MySQL 5.5
  • MySQL 5.6

All tests were performed with MySQL unconfigured (In other words, no my.cnf was made). The results?

  • MySQL 4.1 performs the best single-threaded
  • MySQL 5.1 with InnoDB plug-in scales on multiple cores better than 5.1 InnoDB built, 5.5 and 5.6

If you want newer versions of MySQL to perform better, you must tune for it. In fact, I described in the DBA StackExchange the idea of performing a MySQL Bakeoff.

What do I mean tune for it?

In MySQL 5.5, there are new InnoDB options for utilizing more dedicated read threads, write threads, and overall I/O capacity. This can engage more CPUs in multicore servers. Left unconfigured, MySQL 5.5 would operate on the same level playing field, in most cases, as older versions of MySQL. Sometimes, it could perform worse.

share|improve this answer
1  
Your answer is correct but I think it does not apply to OP. When he configures InnoDB, then we'll see. –  Laurynas Biveinis Nov 25 '11 at 9:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.