TPC-C analysis using HammerDB on 4000 warehouses and VU sweep from 4 to 1024 on MySQL v26.7.0 on InnoDB and TidesDB.
The latest from the MySQL community
Ideas, releases, practical guides, and perspectives from the people building with MySQL.
Step 3: Why my sysbench-trained build loses and how to do it
right.
Given the topic complexity and the length of this article I have split it in 3 three different blog-post:
- What is PGO
- How PGO it works
- Why my sysbench-trained build loses and how to do it right.
Three compounding reasons:
-
Uncovered code gets pessimized.
Sysbench-tpcc touches a narrow slice of mysqld.
Every function with zero counts is treated as cold: GCC optimizes it for size, skips inlining, and shoves it into cold sections.
But at runtime I still execute plenty of code my training never touched, such as purge, flushing, stats …
Step 2: How it works
Given the topic complexity and the length of this article I have split it in 3 three different blog-post:
- What is PGO
- How PGO it works
- Why my sysbench-trained build loses and how to do it right.
How PGO works: PGO is a two-pass build. First pass
compiles with instrumentation (-fprofile-generate): every
basic block and branch gets a counter.
You run a training workload, counters are dumped to
profraw files.
Second pass recompiles using those counts to drive inlining
decisions, branch layout (hot path falls through, cold path jumps
away), hot/cold function splitting, code ordering for icache/iTLB
locality, …
Given the topic complexity and the length of this article I have split it in 3 three different blog-post:
Step 1: What is PGO
PGO (Profile-Guided Optimization) is a two-pass compilation technique.
First, we build the program with instrumentation that adds
counters to every branch, loop, and call site.
Next, we run it against a representative training workload so
these counters can record which code paths are actually hot
versus cold.
We then recompile the program using that data to drive the
compiler’s decisions.
With this profiling …
[Read more]In our previous blog post ProxySQL HA with BGP ECMP Anycast, we established why we would want to use BGP ECMP as a strategy for making our ProxySQL cluster highly available. Now let’s look at how to implement it technically.
For this scenario we assume that we have:
- an OPNsense instance as our BGP Router with the IP address
10.5.8.251 - Two ProxySQL nodes (proxysql-01 with IP
10.5.20.4and proxysql-02 with IP10.5.20.5) -
10.5.200.1as the anycast IP we want both ProxySQL nodes to accept connections on
Setup on the router Enable BGP on OPNsense
The out-of-the-box installation of OPNsense does not come with
BGP support. To add it, install the FRRouting package first
(os-frr), which will enable …
Ask anyone who runs a multi-node MySQL Galera Cluster in production about their worst night. Almost nobody says write-set replication was wrong. They say something closer to this:
“All queries piling up… no error messages in logs.”
Twenty minutes of downtime, ended only when a human picked a node to kill. (codership-team)
Or the flow-control stall where writes time out and wsrep_flow_control_sent still reads 0, so there’s nothing to alert on and nothing to write in the post-mortem. (codership-team)
You have your own version of these. You didn’t need mine.
And here’s the thing about all of them: the root cause is usually not Galera. It’s flashcache, or a shadowed wsrep_provider_options line, or DNS resolving to …
[Read more]I have been working with databases for almost 20 years, ten of them at Percona. To be honest, a lot of that time was not really “working” with databases. It was suffering with them. Especially in one moment: when somebody comes to you and says, “I think I deleted something I should not.”
You know this moment. An UPDATE with the wrong
WHERE. A DELETE typed in the wrong
terminal tab. It touched 40 rows, maybe 200. Not a disaster for
the business, but a disaster for your evening.
In the first post in this series, we configured MySQL Telemetry to export OpenTelemetry metrics to Prometheus. Once the metrics arrive, the more important question is how a DBA should read them. This post is not a catalogue of every metric or meter. Its purpose is to build a practical way of thinking: start with […]
At a recent discussion with MySQL ACEs and Rockstars, we were asked a fair question: If a bug is fixed in one supported MySQL LTS series, why isn’t it always fixed in another? A quick refresher: LTS means Long-Term Support. Within an LTS series, MySQL aims to keep the feature set and data format stable […]
MySQL is very good at serving application workloads, but things get more complicated when somebody decides to run a large report on the same server.
A scan can push hot pages out of the buffer pool. A long-running
read can hold back purge. A GROUP BY over millions
of rows can start writing temporary tables to disk.
The traditional answer is a reporting replica. But that means running another MySQL server, and at the end of the day it is still a row-oriented database.
Another option is moving the data into an analytical database. That can work very well, but now you have a data pipeline to build, operate, monitor, and eventually debug.
We have been looking at what MySQL users can do with DuckDB, and DBTrail is an interesting approach.
DBTrail is open source under Apache 2.0. It is being built by Daniel Guzman-Burgos, who previously worked at Percona as a MySQL Technical Lead.
…
[Read more]