/plushcap/analysis/planetscale/profiling-memory-usage-in-mysql

Profiling memory usage in MySQL

What's this blog post about?

The text discusses how to profile the memory usage of a MySQL connection using built-in mechanisms in MySQL. It covers memory statistics, finding usage for a connection, collecting usage over time, and plotting memory usage with visualizations. The author provides Python scripts that can be used to monitor memory usage during query execution and generate live stack plots showing the top memory usage categories. This detailed profiling of memory usage can help in identifying when and why MySQL may cause memory pressure on the system or if a memory upgrade for the database server is needed.

Company
PlanetScale

Date published
April 11, 2024

Author(s)
Benjamin Dicken

Word count
2095

Language
English

Hacker News points
4


By Matt Makai. 2021-2024.