lefred

lefred

I am MySQL Community Manager for EMEA & APAC. I joined the MySQL Community Team in May 2016. I have been an OpenSource and MySQL consultant for more than 15 years. My favorite topics are High Availability and Performance.

Percona XtraDB Cluster “bootstrap” option for init script

If you followed previous post about init script (here and here) for Percona XtraDB Cluster, I proposed a new solution to standardize the bootstrap of the cluster in debian/ubuntu and redhat/centos instead of using 2 different ways.

You can read about this on launchpad bug #1152764.

So now to start the first node of a cluster when no other node is already running, you just need to use bootstrap command with the init script like bellow:

# /etc/init.d/mysql bootstrap
Starting MySQL (Percona XtraDB Cluster)..... SUCCESS!

I attached the patches here too.

Percona XtraDB Cluster init script for Debian/Ubuntu patch (version 2)

Recently I wrote a blog post with a patch for Percona XtraDB Cluster Init script. But this was more a dirty hack then a real debian/ubuntu patch as Jan pointed it to me.

So I rewrote that patch to not work as the init script of RedHat/CentOS but more like it should work on Debian,

Now to initialize the cluster, on the very first node that will start the cluster, you need to run the following command:

root@percona1:/etc/init.d# /etc/init.d/mysql initialize
 * Starting MySQL (Percona XtraDB Cluster) database server and initialize the cluster mysqld                                  [ OK ] 
 * Checking for corrupt, not cleanly closed and upgrade needing tables.

Please note, the new command initialize.

I hope this patch is better for Debian afficionados ;-)

Galera Load Balancer: new rpm for glb 0.9.2

Codership released a new version of the load balancer for Galera. I made new rpms but I forgot to share them ;)

Here they are !

This new version provides ] a "single" balancing policy where all connections are directed to a single destination chosen by highest weight, a --top option that forces balancing only between the destinations with the highest weight, and a SO_KEEPALIVE option on destination connections (default: on) for timely detection of the destination failure.

CentOS 6 very slow with Vagrant

I use Vagrant to test almost everything. But since I upgraded to VirtuabBox 4.2.x and CentOS 6 as guess OS, I had the impression that everything was slower... and I get use to it...

But this week-end while preparing selinux policies for Percona XtraDB Cluster, I noticed that it was really slow.... really really very very slooooow :'-(

And I found the reason ! I first tried to add some kernel parameters like :

noacpi 
noapic 
divider=10 
notsc

But that didn't help.

Then I just enabled IO APIC on the VM's configuration and it worked much faster ! The boot of the machine was faster and in my case loading selinux policies too !

Have a look to the difference:

Without IO APIC:

[root@node2 ~]# time semodule -i percona-xtradb-cluster-full.pp

real	6m3.646s
user	1m34.430s
sys	3m42.805s

With IO APIC:

[root@node2 ~]# time semodule -i percona-xtradb-cluster-full.pp

real	0m14.611s
user	0m13.829s
sys	0m0.769s

To enable IO APIC from Vagrant, these are the parameters to use in your Vagrantfile:

config.vm.customize ["modifyvm", :id, "--memory", "256", "--ioapic", "on"]

Percona XtraDB Cluster init script for Debian/Ubuntu patch

On mysqlperformanceblog, I wrote on what was an easy solution to initialize a PXC cluster without modifying the configuration file (my.cnf) but only by providing a parameter to the init script. (link to that post) Unfortunately, this works only on RedHat systems (including CentOS, Fedora...

For Debian/Ubuntu, I wrote a minimal patch allowing that. The patch is attached to this post.

Enjoy !

As MySQL Community Manager, I am an employee of Oracle and the views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

You can find articles I wrote on Oracle’s blog.