Posts

Showing posts from November, 2018

Debugging MySQL Memory Alerts: When innodb_buffer_pool_size Isn't the Whole Story

Image
Posted on MySQL Ninjas | August 2026 Every DBA has been there. An alert fires. You SSH into the box, run free -h , and see MySQL consuming far more RAM than you configured. You double-check innodb_buffer_pool_size . It's set correctly. So where is the memory going? This is the story of debugging exactly that — on a Google Cloud c4d-standard-4 instance with 14.7 GB RAM, MySQL configured with a 7168 MB buffer pool, and mysqld RSS sitting at 10.4 GB . That's a 3.2 GB gap nobody could explain. The Setup We run a large MySQL fleet on GCP — over 200 DR replica nodes across three datacenters. As part of a buffer pool tuning project (fitting the right pool size to the right machine class), we set innodb_buffer_pool_size = 7168 MB on our c4d-standard-4 nodes (16 GB RAM, 14.7 GB usable). Shortly after, memory alerts started firing. When I looked at what was actually happening: $ ps aux | grep mysqld | awk '{print $6/1024 " MB"}' 10490 MB ...

MySQL Multi Source Replication With GTID and Non-GTID Mode

Image
During our recent migration we migrated a part of a app to different region with new db. Our previous setup was on MySQL 5.6.39 with single write master and multiple slave to read data.   Current Setup: But now Masters will be two one for old and second for new migrated service. We moved new master on MySQL 5.7 with GTID, MTS and Logical Clock based replication. So our use case was to read whole data (written on master1 + master2) from slaves. So now question is What we have done to achieve this? Below is  New Setup: Now Question is what slave 5 is doing and how we can generate GTID on an intermediate slave? Ans: With the help of our community expert (Jean-François Gagné) we got to know that we can generate GTID on an intermediate slave using process described in blog:   https://goo.gl/aKBxLU So we compiled MySQL from patched source code and rolled out GTID on it. It worked and started generating GTID's. Now we upgraded our existing...