Skip to content
MySQL fork maintained and used at Twitter
C++ C Perl Shell CMake Objective-C Other
Find file
Latest commit 865aae5 Jun 12, 2015 @inaam-rana inaam-rana Twitter MySQL-5.5.44.t20
Failed to load latest commit information.
BUILD Updated/added copyright header. Added line "use is subject to license… Feb 17, 2014
Docs Merging the changes for Bug 1663316 - MYSQL.INFO CONTAINS OUTDATED IN… Apr 16, 2013
client Bug#17633291: SET PROPER COMPILE OPTIONS FOR CLANG Feb 10, 2015
cmake Bug#20872436 MAKE DIST BY MISTAKE COPIES FILES WITH VARIABLE EXPANSION Jun 12, 2015
cmd-line-utils Bug#20318154 : NEGATIVE ARRAY INDEX WRITE V2 Jun 12, 2015
dbug BUG#16402143 - STACK CORRUPTION IN DBUG_EXPLAIN Apr 10, 2013
extra Bug#20201864 : UPGRADE TO YASSL 2.3.7 Feb 17, 2015
include Updated the copyright year in the welcome message for MySQL Feb 17, 2015
libmysql Merge tag 'mysql-5.5.39' into MYSQL-378 Aug 6, 2014
libmysqld Bug#17633291: SET PROPER COMPILE OPTIONS FOR CLANG Feb 10, 2015
libservices Updated/added copyright headers Jun 30, 2011
man Exclude NDB man pages from a source tarball, Oct 4, 2011
mysql-test Fix failing tests after merge Jun 12, 2015
mysys Bug#19974500: SERVER 5.5 / DEBUG DOESN\'T COMPILE WITH GCC 4.9.1 Feb 14, 2015
packaging Bug#20734434 - SPELLING ERROR \"EMDEDDED\" IN RPM SPEC FILES Jun 12, 2015
plugin Bug#17633291: SET PROPER COMPILE OPTIONS FOR CLANG Feb 10, 2015
regex BUG#14303860 - EXECUTING A SELECT QUERY WITH TOO Jan 14, 2013
scripts Bug#17619241 SERVICE OR MYSQLD_SAFE STARTS PICKING WRONG PLUGIN DIREC… Jun 12, 2015
sql-bench Bug#16395459 TEST AND RESULT FILES WITH EXECUTE BIT Jun 25, 2014
sql-common Bug#17599258:- ERROR 1160 (08S01): GOT AN ERROR WRITING Feb 14, 2015
sql MYSQL-524: Merge upstream MySQL-5.5.44 Jun 12, 2015
storage Bug# 19573096: LOADING CORRUPTED GEOMETRY DATA INTO A Jun 12, 2015
strings Merge tag 'mysql-5.5.40' into MYSQL-441 Nov 4, 2014
support-files Bug#20734434 - SPELLING ERROR \"EMDEDDED\" IN RPM SPEC FILES Jun 12, 2015
tests Changing the copyright headers a bit to be complaint with the standards Feb 10, 2015
unittest Merge tag 'mysql-5.5.37' into MYSQL-344 Apr 29, 2014
vio MYSQL-524: Merge upstream MySQL-5.5.44 Jun 12, 2015
win Updated/added copyright headers Jun 30, 2011
zlib Backport from trunk: May 7, 2014
.bzrfileids Adding patch for security bug 19471516 Sep 8, 2014
.gitignore Create .gitignore as a copy of .bzrignore Feb 10, 2015
.reviewboardrc Specify the repository name for Review Board. Nov 16, 2011
BUILD-CMAKE Updated/added copyright headers Jun 30, 2011
CMakeLists.txt Bug#20136840 REMOVE REMAINING REFERENCES TO BZR IN CMAKE SCRIPTS Feb 17, 2015
COPYING Use a new version of "COPYING", the GPL text. Mar 4, 2010
INSTALL-SOURCE Merging the changes for Bug 1663316 - MYSQL.INFO CONTAINS OUTDATED IN… Apr 16, 2013
INSTALL-WIN-SOURCE Merging the changes for Bug 1663316 - MYSQL.INFO CONTAINS OUTDATED IN… Apr 16, 2013
README-MySQL Updated the copyright year in the welcome message for MySQL Feb 17, 2015
README.md Complete a thought and correct for consistency. Apr 9, 2012
VERSION Twitter MySQL-5.5.44.t20 Jun 12, 2015
config.h.cmake Merge tag 'mysql-5.5.36' into Twitter MySQL 5.5.36.t16 (MYSQL-313) Apr 15, 2014
configure.cmake Bug#17633291: SET PROPER COMPILE OPTIONS FOR CLANG Feb 10, 2015

README.md

Twitter MySQL 5.5

This is Twitter's MySQL development branch, which is based on MySQL 5.5 as published by Oracle on MySQL on Launchpad.

This repository is published in order to share code and information and is not intended to be used directly outside of Twitter. We provide no guarantees of bug fixes, ongoing maintenance, compatibility, or suitability for any user outside of Twitter.

The original README file provided with the upstream MySQL release can be found at README-MySQL.

Features in Twitter MySQL

Additional status variables

Additional status variables have been added, particularly from the internals of InnoDB. This allows us to monitor our systems more effectively and understand their behavior better when handling production workloads. The variables added are:

  • The number of InnoDB files and tablespace files opened, closed, and currently open. This information was previously not exposed by InnoDB.
  • The number of deadlocks encountered. This information was previously not exposed by InnoDB.
  • The current log sequence number (LSN) as well as the LSN flushed up to and checkpointed up to. This information has previously been available in SHOW ENGINE INNODB STATUS.

Optimization of memory allocation under NUMA

On most recent multi-processor systems, a non-uniform memory access NUMA (NUMA) architecture is in use, which divides the total system memory across multiple NUMA "nodes". When allocating large amounts of memory to InnoDB's buffer pool, as is typical, some inefficiencies as well as serious problems can be encountered. More details about the problems typical in NUMA systems running MySQL can be found in a blog post by Jeremy Cole. The following changes have been made to optimize and improve this:

  • An option has been added to forcibly pre-allocate the entire buffer pool during startup. This is primarily intended to force the system to decide which pages to allocate, and on which NUMA node to allocate them. If the buffer pool can't be fully allocated for any reason, InnoDB will abort during startup.
  • An option has been added to mysqld_safe to wrap the start of mysqld with numactl --interleave=all to interleave memory allocation between all NUMA nodes available. This ensures that no NUMA node is favored for any allocation, so that memory usage will remain even over time between multiple NUMA nodes.
  • An option has been added to mysqld_safe to flush the operating system buffer caches before startup (on Linux only). Linux will normally not evict optional caches to make new allocations unless the system is under memory pressure, which can cause supposedly evenly interleaved memory allocations to still be done unevenly, favoring the node with less data cached before startup. Flushing the caches before startup ensures that no large cache allocations are present in the system before InnoDB allocates its buffer pool.

Server-side query timeout

  • Reduced unnecessary work through improved server-side statement timeout support. This allows the server to proactively cancel queries that run longer than a millisecond-granularity timeout.

Buffer pool export and restore by prefetch

  • Export and restore InnoDB buffer pool in using a safe and lightweight method. This enables us to build tools to support rolling restarts of our services with minimal pain.

Optimization for solid-state drives (SSDs)

  • Optimize MySQL for SSD-based machines, including page-flushing behavior and reduction in writes to disk to improve lifespan.
Something went wrong with that request. Please try again.