Category Archives: mysql

On InnoDB compression in production

Our latest changes have been pushed to public mysql@facebook branch, allowing this post to happen \o/ Recently we started rolling out InnoDB compression to our main database tier, and that has been a huge undertaking for multiple teams and a … Continue reading

Posted in facebook, mysql | Tagged , | 1 Comment

on MySQL replication prefetching

For the impatient ones, or ones that prefer code to narrative, go here. This is long overdue anyway, and Yoshinori already beat me, hehe… Our database environment is quite busy – there’re millions of row changes a second, millions of … Continue reading

Posted in facebook, mysql | Tagged , | 4 Comments

Blowing up in memory

MySQL isn’t too concerned about table handler memory usage – it will allocate row size buffer thrice per each table invocation. There’s a few year old bug discussing UNION memory usage – for each mention in an union one can allocate … Continue reading

Posted in mysql | Tagged , , , | 7 Comments

On connections

MySQL is needlessly slow at accepting new connections. People usually work around that by having various sorts of connection pools, but there’s always a scale at which connection pools are not feasible. Sometimes connection avalanches come unexpected, and even if … Continue reading

Posted in facebook, mysql | Tagged , , | 16 Comments

InnoDB subsystems in color

I tried to put every subdirectory of InnoDB codebase into a chart that would explain some of relations between subsystems and modules inside the source. This is what I got (click to enlarge): Update: Check Vadim’s diagram for a more … Continue reading

Posted in mysql | Tagged , , | 5 Comments

Stonebraker trapped in Stonebraker 'fate worse than death'

Oh well, I know I shouldn’t poke directly at people, but they deserve that sometimes (at least in my very personal opinion). Heck, I even gave 12h window for this not to be hot-headed opinion. Those who followed MySQL at … Continue reading

Posted in facebook, mysql | Tagged , , , , | 30 Comments

InnoDB locking makes me sad

Vadim and others have pointed at the index->lock problems before, but I think they didn’t good job enough at pointing out how bad it can get (the actual problematic was hidden somewhere as some odd edge case). What ‘index lock’ … Continue reading

Posted in facebook, mysql | Tagged , , , | 19 Comments

MySQL metrics for read workloads

There are multiple metrics that are really useful for read workload analysis, that should all be tracked and looked at in performance-critical environments. The most commonly used is of course Questions (or ‘Queries’, ‘COM_Select’) – this is probably primary finger-pointing … Continue reading

Posted in facebook, mysql | Tagged , , , ,

On database write workload profiling

I always have difficulties with complex analysis schemes, so fall back to something that is somewhat easier. Or much easier. Here I will explain the super-powerful method of database write workload analysis. Doing any analysis on master servers is already … Continue reading

Posted in facebook, mysql | Tagged , , | 5 Comments

5.6!

As extremely happy user of crash-safe-slave functionality since 4.0, I hereby welcome this feature in upcoming 5.6 release! 5.6 seems to be strongest production-support release since introduction of InnoDB, solving issues of long running high performance systems, that were forced … Continue reading

Posted in mysql | Tagged