MySQL on a virtual machine is gradually slowing down, what could be the reason?
The effect is manifested after a few months, approximately six months. On a dedicated server doing virtualization KVM and up dev on QCOW2 disk image file to a preset size. Start the database server on it and nothing more. Everything works fine for a few months, and then begins to gradually slow down - increasing the number of slow queries to the Slow Log.
It would seem linearly with increasing load, but no. If you do reinstall new path everything is back to normal. I don't remember exactly, but seems to be additionally influenced reinstal OS on a physical server. Is it me or is it not a coincidence? Because reinstal new path/servers once in a quarter/six months is not an option. To know the reason for this phenomenon. I can tell why this is happening?
About 20GB of database queries a lot. Table large on 25M lines. Slow queries become regardless of their complexity and appear in batches. Apparently the problem is in the drive/image, but what exactly, I don't know. As I understand it, increasing the response speed of the disk, and with it the queries slow down.
Shakira.Cruickshank answered on June 26th 19 at 14:35
For a long time and a long time studying the issue, it's not virtual reality at all. The trouble all modern hypervisors, carrying more than one path, in a joint access drive. What is your average load on the hypervisor? Surely, the dev with MySQL than one?
Eulalia22 answered on June 26th 19 at 14:37
for starters do not use qcow and optimizethe of faluji on the host and the guest