Ok, that's good. I've seen some really bad configurations where MySQL was configured to use 100GB while the machine only had 12GB. And that's obviously going to cause problems.mysqltuner say that MySQL can max use of 5.1 GB ram and max reached is 3.6 GB.. (system has 32 GB)
It could be anything really. Try and get the actual numbers, not something you remembered, we can probably tell what's what if we have the original output.Can resource locks also can be CPU or filesystem (ZFS) based?
I would definitely start there, it's not normal for MySQL to use 99% CPU. So something fishy is going on. Look at the process list of MySQL:I am not sure, is it the right way find out what these locks are or should I find out what's the high system CPU usage is?
SHOW PROCESSLIST;
. Look for abnormal queries or queries that have been running a really long time. If the MySQL database is used for some web application take a really good look at that too, SQL-injection problems are common in badly written web applications.