Yet another performance degradation research induced by mutex in an unexpected hotpath in a mature database code.

Couple years ago Marko decided to remove a partioned LRU cache from MariaDB(it is still used in MySQL code). There was a lot of doubt regarding this but his solution worked as good as a previous one for most of microbenchmarks except one. However at the time of the transition this performance regression had not been noticed. In March 2025 Mark Callaghan demonstrated the regression that has been introduced in 10.5. However his statistical results contained an interesting outlier for 10.8.8 that was on par with 10.4 and 3x faster than any version after 10.5. Alessandro Vetere was able to find out an offending mutex that syncs B-tree read operations running the microbenchmark reclaiming the lost performance.

参与讨论