Ulf Wendel

About the performance of mysqlnd-5.0.0-alpha

I have written a long, long blog entry How fast is mysqlnd-5.0.0-alpha?.I do not want to spam the Planets with all of it. It’s aimed at PHP and MySQL users that want to hear in detail what we know about the performance of the first alpha release of the MySQL native driver for PHP.

The following table demonstrates pretty well where we are with mysqlnd. For a first alpha it shows an acceptable performance.

As an example of a realistic benchmark, we have followed the decision of the german computer magazine c’t and choosen the Dell DVD Store. Last year a MySQL team had won (german press release) a database performance contest of the magazine and outperformed its competitors by far with an Apache, MySQL and PHP based contest submission. The benchmark is an OLTP-style application that simulates users browsing an online DVD store and purchasing DVDs.

Dell DVD Store results*
ext/mysqli using mysqlnd 10505 opm 100%
ext/mysqli using libmysql 9882 opm 94%
ext/mysql using libmysql 10203 opm 97%

Neither MySQL nor PHP have been tuned for the computer we used for benchmarking. Apache, PHP, MySQL and Mono driver program generating the web request have been running all on the same computer. Not the absolute figues are important. It is important to see that mysqlnd seems to be a bit faster than libmysql, at least as fast as.

We have done some micro-benchmarking that seems to prove that we have been able to make mysqlnd faster than libmysql. Some of the figures are impressive, for example mysqli_affected_rows() seems to be more than twice as fast as before. When fetching buffered result sets similar performance improvements seem possible. You can find details in How fast is mysqlnd-5.0.0-alpha?

However, in the end it depends very much on your applications and environments, if you will see any considerable performance improvements. It’s impossible to to promise a general speed-up.
< &p>
Our request to you is to do your own benchmarking and to tell us what you find. We are eager to hear from you on the mailing list php@lists.mysql.com (see also http://lists.mysql.com/php). Enjoy the weekend!

2 Comments

  1. Hey Ulf,

    Good results and good to see you’re using Dell DVD Store as benchmark not some kind of silly run select in the loop.

  2. Thanks Peter!

    BTW, I did also run the PHPTestsuite from your site with an ealier version of mysqlnd. It was in line with the Dell DVD Store results: mysqlnd seems about as fast as a libmysql solution with a tendency to be a bit faster. However, I did not test much with the concurrency settings.

    Everybody,

    if you have any other suggestions how to do a realistic benchmark and which setup to use, please mail us. As long as the benchmark is as simple to run as Peter’s or the Dell DVD Store I can try to run it on small single CPU boxes with 1-2GB as well as a multi-way Xeon box with 8GB of RAM. I can’t promise I can run the any suggested benchmark soon, because of other things on my TODO, but I can at least keep it in mind…

    Thanks!
    Ulf