See this graph? It's my last employer's AWS monthly bill from January 2023 to January 2026, but just their Aurora databases' storage, IO and backups. I made a few fixes in the couple months before I left a year ago, but it took a year to show how much money the fixes saved. 🧵

I should've probably waited until next month to ask for the graph, as there's probably a bit more to drop still.

Their biggest Aurora database server had a massively inflated ibdata1 file due to a zombie query on the replica that ran for months, before I started in 2022. Aurora replicas share the same storage as the primaries, and you can't just shrink that file. Newer Aurora/MySQL servers don't let long queries inflate that file.

I think 85% of the data files were wasted space, and backups were file snapshots so the backups were inflated too.

And the backups were more expensive than anything else with the databases, which I didn't look at before because the backups weren't my job (bit weird but ok).

Anyway, I did a few things in my final months, which I probably wrote about before:

1. Forced an investigation into the backups, so we found a way to save money while keeping the same number.

2. Rebuilding the main database so that it doesn't have the inflated ibdata1 file of wasted and expensive space. 🧵

@giflian
From ~$3k down to $750.

Nice work!

@DaveMasonDotMe more like $600, and that's including new servers they've since added. And maybe missing a month more of deletes. Not that that's important