Categories
MySQL

Percona toolkit 2.2.5

Percona toolkit 2.2.5 is now available on Dotdeb for both Debian 7.0 “Wheezy” and Debian 6.0 “Squeeze”. It fixes 5 bugs as well as 4 new features.

As usual, before upgrading, please read the list of changes for Percona toolkit 2.2.5 and the announcement by Hrvoje Matijakovic.

Categories
Nginx

Nginx 1.4.0, for Wheezy and Squeeze

Nginx 1.4.0 stable version has been released on April 24th 2013, incorporating many new features developed in the 1.3.x branch :

As a consequence, Dotdeb’s packages of Nginx 1.4.0 are now available for both Debian 7.0 “Wheezy” and Debian 6.0 “Squeeze” (amd64/i386) with the following changes :

  • (Wheezy only) SPDY support has been enabled in nginx-extras and nginx-full.
  • (Wheezy only) the nginx-passenger flavor has been removed. You should use unicorn or uwsgi-plugin-rack-ruby* instead.
  • nginx-extras now supports HTTP Gunzip.
  • Naxsi has been upgraded to 0.50.
  • chunkin-nginx-module (useless now) and nginx-upload-module (incompatible with 3.1.8+) are no longer supported.
  • The headers-more, echo, lua, Push stream, Pinba and Passenger modules got minor upgrades.

As usual, if you want to know which module has been included in each Nginx flavor, you just have to look at this document.

Categories
MySQL

Percona toolkit 2.1.9

Percona toolkit 2.1.9 is now available on Dotdeb for Debian 6.0 “Squeeze”. It includes many bug fixes and it is worth upgrading to, especially if you were affected by the backwards-incompatible changes to pt-heartbeat in 2.1.8. Take a look at this blog post by Daniel Nichter for more info.

As usual, please read the list of changes for Percona toolkit 2.1.9 before upgrading.

Categories
MySQL

Pinba engine 1.0.0

I already talked about Pinba, this great Application Performance Monitoring (APM) tool that is made of :

  • a MySQL storage engine (pinba-mysql-5.5),
  • a PHP extension (php5-pinba),
  • and even a python module, pynba, (thanks to my IsCool Entertainment friends) and an experimental Nginx module.

But since MySQL 5.1 support has been discontinued on Dotdeb, it was impossible to install the Pinba MySQL storage engine, just because it depended on a non-existant MySQL 5.1 version.

This problem is now fixed and I’m proud to announce that the Pinba storage engine version 1.0.0 is now compatible with Dotdeb’s MySQL 5.5 packages. Just install the pinba-mysql-5.5 package and add the following line to your MySQL configuration file :

plugin-load=libpinba_engine.so

About the PHP extensions, they will be updated from version 0.0.6 to version 1.0.0 with the upcoming PHP 5.4.6 and 5.3.16 packages.

Please visit the Pinba website fore more info (changes, installation, support…).

Categories
Documentation MySQL

Using the Google Perftools to speed up your MySQL server

The Google Perftools, especially tcmalloc (Thread Caching Malloc), can be very useful to speed up your applications, depending on your environment :

TCMalloc is faster than the glibc 2.3 malloc (available as a separate library called ptmalloc2) and other mallocs that I have tested. ptmalloc2 takes approximately 300 nanoseconds to execute a malloc/free pair on a 2.8 GHz P4 (for small objects). The TCMalloc implementation takes approximately 50 nanoseconds for the same operation pair.

Its deployment in your LAMP stack can speed up your MySQL servers, since it enhances memory allocation on threaded applications with the downside of larger memory footprints.

Here is how to use it easily…

Installation

First of all, be sure you use Debian 5.0 (a.k.a. “Lenny”) or later. Then install the minimal tcmalloc library from Dotdeb :

apt-get install libtcmalloc-minimal0

Then, since the mainstream MySQL packages are not compiled against tcmalloc, you’ll have to trick your OS’ dynamic linker by adding the following line at the top of your /etc/init.d/mysql init script :

export LD_PRELOAD="/usr/lib/libtcmalloc_minimal.so.0"

/etc/init.d/mysql modification

After relauching your MySQL server using the modified init script, you’ll take profit from tcmalloc’s faster memory allocation.

Results

At the time of writing this article, I didn’t make benchmarks, but some reported that they had a ~15-20% performance gain. Please leave comments about your experience.