Saturday, 7 July 2007

mysqlnd (the MySQL native driver for PHP) needs testers and benchmarkers

MySQL welcomes external verification by high-volume LAMP websites of the performance improvements gained by replacing libmysql with mysqlnd.

To recap some basics from the mysqlnd download page at http://dev.mysql.com/downloads/connector/php-mysqlnd/:


The MySQL native driver for PHP is an additional, alternative way to connect from PHP 5 and PHP 6 to the MySQL Server 4.1 or newer. It is a replacement for the libmysql, the MySQL Client Library. From now on you can use ext/mysqli either together with libmysql as you did in the past or with mysqlnd.

We have no plans to remove libmysql support from ext/mysqli, which would break existing applications. We just add a new, superior alternative to our PHP offerings.

For development discussion and bug reporting a new mailing list has been created php@lists.mysql.com. See also http://lists.mysql.com/.


Georg Richter has now sent the PHP extensions for mysqlnd to the PHP Core Team for reviewing. The interfaces to PHP may then be put directly into the PHP CVS repository, whereas mysqlnd remains to be downloaded from MySQL's download site.

The code base of mysqlnd has been synchronised with the PHP CVS repository of php.net. While mysqlnd was originally designed for PHP 6, Andrey Hristov has now finished the backport of mysqlnd to PHP 5 and added support for ext/mysql. Given that 60 % of the PHP user base is still on PHP 4, some heavy PHP users would like to see the backporting done all the way to PHP 4. We are evaluating that, but have no immediate plans for such a backport.

Our next ambition is to prove that mysqlnd is stable and meets the need of the most demanding PHP users. And that is where we need help from the user community. We are looking for testers among PHP users with a high server load, ideally willing to do benchmarks.

Typically, mysqlnd is at least as fast as libmysql. We are writing a MySQL Technical Whitepaper with further details on the performance of mysqlnd, which will be published soon. The document confirms previously published results for the Dell DVD Store, which show ext/mysqli with mysqlnd to be about 5% faster than libmysql. Now, we would like an external verification of our performance improvements, but a small web site is not proof enough, as differences will show up only under high load. We are curious to learn how big the overall speed-up is for a top web site, given that the time spent in the database interface is only a fraction of the overall web page generation time.

Our team has increased their Quality Assurance efforts to further stabilise mysqlnd. Code Coverage analysis with GCOV shows that our tests cover 88% of the underlying ext/mysql C-code, 93% of ext/mysqli and 83% of mysqlnd. We are proud of our improved figures. If you want to compare the values to those of PHP 4.4 and 5.2, check out http://gcov.php.net/.

Due to the help of Kent Boortz in the MySQL Build Team, we are building mysqlnd routinely on 28 platforms. We have run our test suite against more than 20 MySQL Server versions. Still, the positive lab tests need to be confirmed by field usage, quite as the performance figures.

So if you run a high load web site based on PHP and MySQL,

(i) read up on how to get mysqlnd, how to install it, and on the features & limitations as well as the FAQ on the download page

(ii) subscribe to php@lists.mysql.com at http://lists.mysql.com/

(iii) talk to Jay Pipes (at firstname@mysql.com) or Ulf Wendel (at firstname.lastname@mysql.com)! Or, better still, catch them on IRC (#mysql-dev on Freenode).

No comments:

Post a Comment