Windows – MySQL 5.5 on Windows server is horribly slow

MySQLwindows

I have had no luck getting MySQL 5.5 to be as fast as 5.1 or MariaDB on the exact same hardware/database/environment under Windows server 2003R2 or 2008R2.

My benchmarks from our application:

MySQL 5.5 + CentOS 5.2 (XenServer Virtual) = 28 seconds (box is "busy" not buried)
MariaDB (5.1) + Windows 2003 (Physical box) = 130 seconds (box is 2% busy)
MySQL 5.1 + Windows 2003 (Physical box) = 170 seconds (box is 2% busy)
MySQL 5.5 + Windows 2003 (Physical box) = 305 seconds (As high as 600 seconds...) (box is 2% busy)

The only difference between these runs is the removal of skip-locking and the running of mysql_upgrade.exe to update some tables for stored procs on 5.5.

Yes, I know it's a release candidate, I'm feeding that back to MySQL as well.

No slow queries are logged, it doesn't think it's being slow, it just is.

I'm going to start tearing into the queries themselves to see if the INSERT/SELECT plans have gone buggo on 5.5.

Best Answer

Take a look at http://bugs.mysql.com/59133 . It could be flushing to disk most of the times (box is 2% busy is a strong hint for it) You might after careful consideration want to set a combination of

innodb_support_xa=0

innodb_flush_log_at_trx_commit = 0 # or 2?

sync_binlog=0

and see what happens.

Once you get your load CPU-bound, then it makes sense to use Win2008R2, some improvements specifically address Vista+