O_DSYNC Flush Method for MySQL on Google Cloud

On my previous article, I tested ZFS with Google Compute engine using persistent disks and local SSDs. ZFS shows better performance with the help of a fast dedicated SLOG using the local SSD and NVMe driver – though the cloud, especially Google Cloud may not be the best platform for these tests. Fast forward to …

Continue reading

Testing ZFS vs ext4 with sysbench (Google Cloud)

I’ve had a chance to revisit ZFS lately and decided to take some more notes. One highlight of this test is revalidating a quick performance test against ext4. This test is ran on Google Compute Engine n1-highmem-8 (8 vCPU, 52GB RAM) with 2x375G local SSD attached via NVMe and 4x500G standard persistent disks using the …

Continue reading

MongoDB: No host in new replica set maps to this node

In the “trivial-errors” category, I imagine one will encounter this error when setting up MongoDB replica sets.

What this means is that the current instance cannot connect to host 1 in my rsconfig for a few possible reasons. A firewall or network configuration blocking access to the MongoDB port. The host cannot be resolved. …

Continue reading

Assigning Limited Set of Floating IPs with Your DevStack

Recently, I wanted to use the public IPs assigned to my server to the devstack environment. The hosting company has allocated a /29 subnet for the server I am renting. In my local.conf I can either specify FLOATING_RANGE=204.xx.xxx.10/29 to so I can use 204.xx.xxx.10-14 as floating IPs for the VMs. However, I do not want …

Continue reading

Does Python MySQLdb Make You Wait?

Recently while writing a data loading application for a customer, we’ve come into a problematic situation with the Python MySQLdb module that can be installed with base RHEL repository or DVD. As a little background, this application uses an HA architecture where a Virtual IP can be assigned to different servers during a failover scenario. …

Continue reading

Percona Replication Manager – Renaming Cluster Hostnames

Recently I’ve had to rename a node on a production cluster – however, I did not have an experience on this yet so I decided to try on a sandbox and establish a known procedure. Without further ado, assuming we have 3 nodes and we want to rename ha3’s hostname to ha03.

Here we …

Continue reading

Sandboxed MySQL Utilities – HowTo

Often I would need to work on customer servers where MySQL Utilities would be a really good fit for the tools I need. However, I would not want to mess around with the customer servers just to have it running so I would have the tools built and sandboxed on its own directory where I …

Continue reading

XtraBackup Complains of Missing perl-DBD-MySQL

I was busy testing a PXC cluster today when suddenly was buffled with a confusing error:

OK, so my first though was DBD::mysql is missing, but as I checked:

After some digging, it’s not actually the module that is missing – it was one of the module’s dependency which is the mysql client …

Continue reading

RDS Migration from 5.5 to 5.6 with mysqldump

Amazon recently announced support for 5.6, unfortunately, direct upgrade from lower versions is not yet supported. On a recent migration work – running mysqldump flat out would’ve meant 6+hrs of downtime. How did we cut it off to 1h45m? Simple, run dump per table and pipe it directly to the new 5.6 instance in parallel …

Continue reading

Limit The Size of Your Core Files on Linux

So we all know that when troubleshooting MySQL crashes or any other processes in that regard, we simply enable core files to be dumped when the appropriate signal it triggered. To get the best results, we’d set the core file size limit everywhere to unlimited and be done with it, but what if you want …

Continue reading

Default RDS Account Privileges

I was searching looking for the PRIVILEGES that comes with the primary MySQL account on RDS, but it looks like this is not documented anywhere nor blogged about yet. So for the sake of other users, here it is:

In case you ask, for what, I was looking for what privileges I can grant …

Continue reading

Zend_Paginator Without Adapter Data

If you simply want to take advantage of Zend_Paginators page generation function without feeding it actual data, how do you do it? Simple, implement Zend_Paginator_Adapter_Interface in your custom class and override three functions like below:

Then you can use it as you would the paginator class – the only parameter to the constructor is …

Continue reading

Optimizing MIN and MAX MySQL Functions

MySQL can optimize aggregate functions like MIN and MAX as long as the columns specified are indexed. This means that, in the case of MIN and MAX, the optimizer should be able to identify the highest and lowest values of an indexed column from the B-Tree index. Say I have a table like below:

Continue reading

Pacemaker Failed Actions ‘not installed’ And ‘not configured’

Playing around with Percona Replication Manager, and being new to Pacemaker, some errors were somewhat cryptic.

First, it says here that I have ‘operation monitor failed’ on node ha02.localdomain. This error simply means ‘I cannot run the operation monitor because it is not installed’. Where does this operation supposed to come from, from the …

Continue reading

MySQL Backups, The Tools So Far

Backups is one of the most important part of any MySQL deployment, and nowadays, there’s a number of tools to choose from depending on how your organization implements them. The purpose of this post is to enumerate the main tools and some helpers that makes backing up and testing/restoring your backups more convenient. By all …

Continue reading

Reduce Stack Frame Depth from XDebug Trace Output

Earlier, I’ve written about how to dump code trace from your PHP application using XDebug, however, more often that not, you get lengthy results and you simply want to get an overview up to certain depth. I’ve created a simple PHP for that which you can find here. It’s fairly easy to use, simply feed …

Continue reading

Check (Rough) Progress of Your CSV Import to MySQL

If you are importing large CSV or SQL dumps to MySQL, chances are you were looking for ways to see how far the import has gone. If you know how many rows there are from the file being imported, you can do a SELECT COUNT(*) but that would take sometime for the query to finish …

Continue reading