We have a MySQL master server here which was not set up with any kind of management for the binary logs. Over time, the disk space (1 TB) was slowly filling up and it was noticed that the performance of the MySQL server was becoming worse. At the time, I didn't make any connection between disk space issues and performance. I took it upon myself to clean this up, backing up old binary logs and freeing up space on the server.
Now that the transition is (mostly) complete and the server has much more free disk space, I've noticed that the performance has increased. I don't have any numbers to back this up, but one thing that I have noticed is that certain transactions in some of our apps which used to time out on a semi-regular basis are now proceeding smoothly.
I can imagine a couple of explanations for the improved performance:
- The disk controller is not having to search as hard for free space
- MySQL is better able to optimize tables, indices, etc.
but I really don't know why. So I really have two questions:
- Can a lack of free disk space impact MySQL performance?
- If so, why?