Explore the architecture of Percona Server for MySQL, one block at a time.

Pace
16 CPU cores

Reach the summit by building MySQL, one block at a time. Point at any block, or tap it, to see what it is.

Real-world time so far 0:00:00
Engineer view & settingsServer version (9.7 or 8.4), CMake options and presets, every build target, CPU cores and the full make log. The tour above uses these settings.

Configure

Your commands


      
Speed
idle
Progress0%
Objects compiled0
Real build clock0:00:00
Estimated real time—

CPU cores

Source tree, bottom to top

compiling linking built disabled by an option Percona addition

$ make -j16


        

make install


          

What's inside MySQL

Percona Server for MySQL 9.7 LTS is built from about 63,920 files in the percona/percona-server repository. About 5,284 C and C++ source files are compiled and linked into one mysqld binary; on a 16-core machine the build takes about 45 minutes. These are its layers, from the bottom of the mountain to the top.

  1. Source code git clone --recursive. The repository and its submodules, such as RocksDB for the MyRocks engine.
  2. Build plan cmake. CMake checks the machine and your options, then writes the compile plan.
  3. Third-party libraries extra/. Bundled open source code: zlib, zstd, lz4, ICU for Unicode, Protocol Buffers, Abseil, libedit, and OpenSSL.
  4. Foundation strings/ mysys/ vio/. Character sets, files and threads, networking, and the client library: sql-common, libmysqlclient, libservices.
  5. Storage engines storage/. Where rows live: InnoDB, MyRocks, MEMORY, TempTable, MyISAM, CSV, and the Performance Schema.
  6. SQL layer sql/. The parser, the optimizer, the data dictionary, histograms, GIS, authentication and privileges, and server services.
  7. Plugins and Percona features plugin/ components/. Group Replication, semi-synchronous replication, Clone, the thread pool, OpenTelemetry, and the features Percona adds: data masking, the audit log filter, PAM and LDAP authentication, keyrings, telemetry, and Percona UDFs.
  8. mysqld and tools link, client/, router/. Everything is linked into mysqld, then the client tools, MySQL Router, and the tests are built.

Walk through it in the quick tour (about four minutes) or the engineer tour with CMake flags, tips, and typical errors.

Percona Build Lab is a simulator: nothing is compiled in your browser. Component names, sizes and file names come from the real source code; build times are an estimate.

How the simulator works

Questions, ideas or found a mistake? Write to the Percona Community team: community-team@percona.com