Hello fellow web pros. Please share your expertise on this subject. when ever i connect to mysql server i get some very high system loads. can anyone please tell me what causes this and how i might go about remedying it
Identify which processes are eating up system resources. Is it MySQL or something else? If it is MySQL then most probably it will be due to slow queries running on it. To identify slow queries, turn on the slow query log and tune them.
Hello mwasif. You hit the nail right on the head it turns out mysql using up most of the cpu. But am not sure about how to go about implementing your suggestion . If you can give me a little more info that would be great
To turn on slow query log, add this to the MySQL section of your my.cnf: log-slow-queries = /var/log/mysql/mysql-slow.log You can also read through a blog post I did a while back, it explains a couple of tools to use to tweak MySQL perfomance: http://solidservers.ca/2009/07/tuning-tweaking-mysql/
This used to happen to me but i switched hosting companies, to hostgator, and everything then worked out
RHS-Chris is right. You need to turn on slow query log. This will help you to identify the slow queries which must be tuned to give some peace to MySQL.
This would assume the TS has root access to his server. If TS does have root access I would also suggest the priming script: http://day32.com/MySQL/ Also to the TS, how is it that you are connecting to the db?