lefred's blog


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

Percona Live MySQL Conference & Expo 2013

For my first participation to THE MySQL event of the year, I have the honour of delivering a full day tutorial on Opetational DBA in a nutshell with my two Belgian colleagues (call us the be-team ๐Ÿ˜‰ ) and a lighting talk related to MySQL database schema migration: how to version them and manage those operations.

If you don’t want to miss THE essential event of the MySQL ecosystem, use code “SpeakMySQL” at checkout for 15% off!

Register here: http://bit.ly/14au67Z.

See you soon there !


nolinger option for Galera Load Balancer (glb)

If you test Galera synchronous replication with Percona XtraDB Cluster or MariaDB Galera Cluster you must have tried to use a load balancer like HA Proxy or Galera Load Balancer.

On very heavy load, you may have issue with a large amount of TCP in TIME_WAIT like this one:

tcp 0 0 127.0.0.1:59035 127.0.0.1:3306 TIME_WAIT

This can lead to a TCP port exhaustion as explained on this post.

On HA proxy since version 1.4.19, you can use the nolinger option also on TCP backends. This terminate the connection (TCP RST) as soon as the loadbalancer finished the communication.

The counter part is that Aborted_clients status counter in MySQL increases with each connections’ end. This counter becomes then useless.

This option is not available on glb (with -l parameter) if you apply the patch attached to this post.

I provide also rpm package with the patch applied :

Name : glb Version : 0.9.2 Release : 2 Architecture: x86_64 Install Date: (not installed) Group : Productivity/Networking/Routing Size : 208489 License : GNU General Public License version 2 or later (GPL v2 or later) Signature : (none) Source RPM : glb-0.9.2-2.src.rpm Build Date : mer 27 fรฉv 2013 17:15:54 CET Build Host : percona1 Relocations : (not relocatable) URL : http://www.codership.com/products/galera-load-balancer Summary : TCP Connection Balancer Description : glb is a simple user-space TCP connection balancer made with scalability and performance in mind. It was inspired by pen, but unlike pen its functionality is limited only to balancing generic TCP connections. Features: * list of backend servers is configurable in runtime. * supports server "draining", i.e. does not allocate new connections to server, but does not kill existing ones, waiting for them to end gracefully. * on Linux 2.6 and higher glb uses epoll API for ultimate performance. * glb is multithreaded, so it can utilize multiple CPU cores. In fact even on a single core CPU using several threads can significantly improve performance when using poll()-based IO. * connections are distributed proportionally to weights assigned to backend servers. * this is a patched version providing SO_LINGER

Example:

[root@macbookair ~]# glbd -K -l --threads 6 --control 127.0.0.1:4444 127.0.0.1:3308 127.0.0.1:3306 glb v0.9.2 (epoll) Incoming address: 127.0.0.1:3308 , control FIFO: /tmp/glbd.fifo Control address: 127.0.0.1:4444 Number of threads: 6, max conn: 493, policy: 'least connected', top: NO, nodelay: ON, keepalive: OFF, defer accept: OFF, verbose: OFF, linger: ON, daemon: NO Destinations: 1 0: 127.0.0.1:3306 , w: 1.000 Router: ------------------------------------------------------ Address : weight usage map conns 127.0.0.1:3306 : 1.000 0.000 N/A 0 ------------------------------------------------------ Destinations: 1, total connections: 0 of 493 max Pool: connections per thread: 0 0 0 0 0 0

If you test it please post a comment.


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.


recent

Last Tweets

  • Next week at ,
  • No Ping Will Tear Us Apart โ€“ Enabling member auto-rejoin in Group Replication !,
  • RT : ใ€Œไธ‰่ฐท ใ•ใ‚“ใฎใ‚ปใƒƒใ‚ทใƒงใƒณใ€ใ™ในใฆ่‰ฏใ‹ใฃใŸใ‚“ใงใ™ใŒ็‰นใซ่‰ฏใ‹ใฃใŸใฎใŒใ€ MySQL InnoDB ClusterใฎConsistency Levelใฎใพใจใ‚ ใ€ ใ€Œใ“ใฎ่พบใฏๅœฐ้›ทใ‚ญใƒฅใ‚ขใ“ใจyoku0825ใ•ใ‚“ใ‹้‹็”จใ‚ญใƒฅใ‚ขใฎไธ‰่ฐทใ•ใ‚“ใซใŠใ‚นใ‚นใƒกใƒ‘ใ‚ฟใƒผใƒณใ‚’ๅฐŽใ„ใฆใปใ—ใ„๏ผ(ใŠๅ‰ใŒใ‚„ใ‚Œ)ใ€wใ€€ ,
  • RT : ใ€ใƒ•ใ‚ฉใƒˆใ‚นใƒใƒƒใƒˆ๐Ÿ“ธใพใจใ‚ใ€‘ ไผšๅ ด ใƒ•ใ‚ฉใƒˆใ‚นใƒใƒƒใƒˆใซใฆๆ’ฎๅฝฑใ€ๆŠ•็จฟใ„ใŸใ ใ„ใŸ็š†ใ•ใ‚“ใ‚ใ‚ŠใŒใจใ†ใ”ใ–ใ„ใพใ—ใŸ๐Ÿ™Œ (ๆŠ•็จฟใ„ใŸใ ใ„ใŸ็”ปๅƒใ‚’ไฝฟ็”จใ•ใ›ใฆใ„ใŸใ ใใพใ—ใŸ๐Ÿ™‡โ€โ™€๏ธ) ๆฌกๅ›žใฏไปŠๅ›žใ‚ˆใ‚Šใ‚‚๏ผ ็š†ใ•ใ‚“ใซๆฅฝใ—ใ‚“ใงใ‚‚ใ‚‰ใˆใ‚‹ไฝ•ใ‹ใ‚’ใ”็”จๆ„ใงใใ‚Œใฐใจๆ€ใฃใฆใŠใ‚Šใพใ™๐Ÿ˜ƒ ,
  • RT : Going to Live Austin but need a guide on what to do and see while there? Here is your guide on bats, breakfast, and BBQ! and be sure to drop by the kiosk @mysql_community,
Locations of visitors to this page
categories