This article is also available in Chinese: 中文版. Browse all English articles.
Have you ever run into a mysqld process that has
been starting for a long time and still won’t come up? When that
happens, you can use perf top to check what the
MySQL process is mainly doing. If what you see looks like the
figure below — the MySQL main thread (the one starting from
mysqld_main) spending the vast majority of its time
rolling back transactions — then you are very likely hitting a
large-transaction rollback.
The most common way to get here is a large transaction that fills
up the disk while writing its binlog, crashing the instance. The
largest binlog file I have run into was over 114GB.
Since the Binlog Cache’s …