lefred's blog


There Are 10 Types of People in the World....

MySQL InnoDB Cluster: Automated Installation with Puppet

We saw yesterday that the new MySQL Shell was out and how we could create a MySQL InnoDB Cluster manually using the Shell. Today, I would like to show you how easy it is to create recipes to automate all the process. I have created a Puppet module that can be used as Proof-of-concept (You might need more features to … Read More


Vagrant environment to test MySQL Group Replication 0.8

Vadim Tkachenko recently released  Docker images for Group Replication (thank you for that 😉 ). As not everybody is already using Docker or just because having multiple choices is also nice (this is an OpenSource world isn’t it ?), I decided to share a Vagrant environment that you can use to evaluate Group Replication. This environment provides also a module that … Read More


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"]


old Chinese proverb… beginning of devops ?

I read this today :

“If we have each one egg and we exchange them, we still each have one egg. If we have each one idea and we exchange these ideas, each of us will have two ideas”

… that’s #devops isn’t it ?


MySQL facter

Yesterday I started to play with mcollective

I added some agents like service and facter.

I really liked the facter agent…. and then I decided to add facts for MySQL.
Of course I needed to learn some ruby first 🙂

A fact is created for the version and all other MySQL facts come from the SHOW STATUS statement.

All the new facts start by mysql_

I plan to add new facts related to the replication like Seconds_Behind_Master

The current version is available on github here

Some usage examples:

with facter:

[root@delvaux facter]# facter mysql_version 2>/dev/null 5.5.10 [root@delvaux facter]# facter mysql_max_used_connections 2>/dev/null 3

with mcollective:

[root@delvaux facter]# mc-facts mysql_version Report for fact: mysql_version 5.0.51a-24+lenny5-log found 1 times 5.5.10 found 1 times Finished processing 2 / 2 hosts in 64.36 ms [root@delvaux facter]# mc-facts mysql_open_files Report for fact: mysql_open_files 16 found 1 times 18 found 1 times Finished processing 2 / 2 hosts in 2418.13 ms [root@delvaux facter]# mc-facts mysql_open_files -v Determining the amount of hosts matching filter for 2 seconds .... 2 Report for fact: mysql_open_files 16 found 1 times delvaux.maladree.be 18 found 1 times debian1.maladree.be ---- rpc stats ---- Nodes: 2 / 2 Pass / Fail: 0 / 0 Start Time: Sat Apr 02 00:11:46 +0200 2011 Discovery Time: 2001.84ms Agent Time: 1344.24ms Total Time: 3346.08ms [root@delvaux facter]# mc-facts mysql_threads_connected Report for fact: mysql_threads_connected 2 found 2 times Finished processing 2 / 2 hosts in 3270.86 ms [root@delvaux facter]# mc-facts mysql_threads_connected -v Determining the amount of hosts matching filter for 2 seconds .... 2 Report for fact: mysql_threads_connected 2 found 2 times debian1.maladree.be delvaux.maladree.be ---- rpc stats ---- Nodes: 2 / 2 Pass / Fail: 0 / 0 Start Time: Sat Apr 02 00:12:47 +0200 2011 Discovery Time: 2001.73ms Agent Time: 50.43ms Total Time: 2052.15ms


recent

Last Tweets Last Tweets

Locations of visitors to this page
categories