In this blog, I’ll look at the impact of swapping on MySQL performance.
It’s common sense that when you’re running MySQL (or really any other DBMS) you don’t want to see any I/O in your swap space. Scaling the cache size (using
innodb_buffer_pool_size
in MySQL’s case) is standard practice to make sure there is enough free memory so swapping isn’t needed.
But what if you make some mistake or miscalculation, and swapping happens? How much does it really impact performance? This is exactly what I set out to investigate.
My test system has the following:
- 32GB of physical memory
- OS (and swap space) on a (pretty old) Intel 520 SSD device
- Database stored on Intel 750 NVMe storage
To simulate a worst case scenario, I’m using Uniform Sysbench Workload:
sysbench …[Read more]