Saturday, February 26, 2011

Why the Facebook/Percona versions of MySQL are so much better

One of my roles at Yahoo is to provide a rock solid infrastructure for MySQL-based projects. In order to provide that infrastructure, I have to satisfy many groups at Yahoo: Developers need an easy way of deploying the db server in their environment. Software Engineering (Operations) is looking for features to help scale MySQL, and DBAs are looking for more knobs and gauges to help tune the server. After about one year of attempting to manage the infrastructure, and following the MySQL sagas, my job is getting easier thanks to companies like Facebook and Percona as well as one of my predecessors (jcole) for releasing quality code that extends MySQL in so many ways than just raw performance. I've been able to take the best code from each company and mold together an internal version that satisfies all crowds. MySQL/Oracle, you should do the same.

14 comments:

wlad said...

Well, that really depends on what you do.
As for me, Percona or Facebook patches do not even compile. Both excel in producing something that compiles only with gcc and works only on Linux ;)

Pavel said...

+1 on that

Bob said...

You would really consider "serving" a function on something other than Linux? ;-)

Bob said...

You would really consider "serving" a function on something other than Linux? ;-)

Mark Callaghan said...

Wlad -does MySQL on Windows matter? If it does, then Oracle is doing a better job with their recent focus on it and MariaDB should get more deployments their given their Windows expertise.

AFAIK, I can't just do "apt get install icc" to install the Intel Compiler. I imagine that limits its use.

Partha Dutta said...

Patching source code is an art form, and its even more difficult when you cull together the best of code that's out there in order to get more bells and whistles (and performance). But the hard work pays off in the long run.

wlad said...

@Mark,
Oracle concentration on Windows, specifically for server and is a great PR job.

What they really have in 5.5 are 2 patches, by myself. It was mainly a 2 weeks job fixing the effects of Google patch. That patch was never tried to be ported on Windows properly, and when it was initially ported (innodb plugin 5.1) and measured, it revealed a greater (devastating) scalability problems with the slow mutex and even implementation. Less significant patch was fixing MDL with new shiny Vista synchronization primitives.

That was the whole focus on Windows on the server side. Again, nice benchmark graphs helped Oracle to PR this arguably simple stuff.

As of yours and Percona and PBXT contributions- I would highly appreciate if contributions were not only high-quality on Linux, but generally platform-aware.

This, in my opinion, should include measurements of the effects of the patches on different OSes - Windows because it is most popular platform MySQL runs on, and Linux, for a smaller portion of high-profile deployments. If you want it, you can add BSD, Solaris x86 and OSX to the mix (all of them run on commodity hardware, I understand that asking about HPUX,AIX and Sparcs would be too much)

If nothing else, portable high-quality patches would be sign of professionalism, as we knew it back when "I do not care about your platform/compiler" attitude was not acceptable.

Sheeri K. Cabral said...

MySQL and Oracle HAVE done the same. MySQL 5.5 contains many of the patches and variables that are in the Percona 5.1 version. What made you think otherwise?

Partha Dutta said...

You need to compare apples to apples (5.1 to 5.1). Based on that, I can show that the performance of versions like Percona are faster than Oracle versions.

wlad said...

I'd like to see an unbiased comparison 5.5 vs 5.5.

5.1 is history.

mleith said...

We (Oracle) have strict change policies in GA versions (for very good reasons).

So comparing 5.1 to 5.1 of each version is useless ... because we simply will not make changes like Percona does in a GA version.

Domas Mituzas said...

@Sire Leith, that excuse would work way better if the very useful Google patch changes weren't there in 4.0 trees.

We should not be talking here about "latest changes to 5.1", it is about featuresets that are extremely useful for past four years, that people run in production :-)

Geeks World Wide said...

That was a wonderful article. It was very interesting and well-written. A good read. Thanks a lot!!

Geeks World Wide
http://www.geeksww.com/

Vijaya Sagar V said...

Thanks for the post Partha. I've been thinking of using Percona and Facebook's forks at my startup (http://shufflr.tv). We have a fairly massive replicated MySQL DB. While I am still searching for a good MySQL DBA who understand 'consumer web' and 'large scale', do you think it is safe to use those patches on production? Especially for on-the-fly schema changes that avoid blocking on 'alter table's.