0

We have a Java based SaaS application running on MySQL database on a 2 GB Linux VPS.

Recently we added RAM to the server and since couple of days, MySQL is taking up 99% of CPU usage. We are quite clueless as to why this is happening.

We have made some changes in the my.cnf file as we have read in certain forums. We have enhanced the resources for MySQL.

Where can we go next?

0

2 Answers 2

1

Most probably you have plenty of 'expensive' queries - like full table scans. Data probably fits in memory but cpu is busy crunching its content. Try suggested slow query logging and use explain command to understand what exactly mysql is doing with those queries.

check this presentation. Try following log analysis tools:

1
0

You can enable the MySQL Slow Query Log to see if you have any exhausting queries running on the server, by default this will log any query that takes longer than 1 sekond to execute.

Also the MySQL profiler ought to be useful to determine what is causing the heavy load on the server.

You must log in to answer this question.