I have a MySQL database server runnuing on Ubuntu 12.10 with 64GB RAM, 2x3 TB SATA 6 Gb/s HDD 7200 rpm and software RAID 1 and an Intel Core i7-3930K.
The database server is accessed over a local network with a dedicated 1 GBit ethernet card.
The database is around 50 GB big and is the master in a replication setup.
IMO, there are two problems that lead to slow MySQL querying:
- The load is always relatively high (>2) even when the db server is idle (it's not a big problem since the processor has 12 cores but it doesn't seem right)
topshows that around 95% of the system is idle, <1% is used 5% is waiting (see following screenshot)
iotop --only shows that most of the disk IO is produced by jdb2/md2-8 and not mysqld - so mysqld shouldn't be the problem - but why is jdb2/md2-8 using up so many ressources?
cat /proc/mdstat outputs the following:
My questions are:
What causes the slow MySQL performance?
Is it the iowait? What causes the iowait?
Is it the RAID 1 - Is it the used harddisk?
Any help is greatly appreciated!