Link to home
Start Free TrialLog in
Avatar of jls33fsls
jls33fsls

asked on

Fix High MYSQL Load

For the past day or so mysqld has been using anywhere from 80-200% of CPU, according to top from ssh.  I am looking for something that can log information for some time, and then I can review it and find out what is causing this.  I have tried the slow queries log and nothing went into it.
Avatar of Rob Siklos
Rob Siklos
Flag of Canada image

you can use " SHOW PROCESSLIST  " to see which queries are running - maybe that will give you some hints.
Avatar of jls33fsls
jls33fsls

ASKER

I know that, and no that will not help.  There are hardly ever any queries that even show up because they all run so quickly.  I know there is software out there, I just can't seem to find it.
It's also possible that it's a bug in MySQL.  I think I've seen this kind of behaviour once in a while, and I just restarted the process and it fixed itself.  You could try upgrading to the latest version perhaps?
I have the latest version, and I have tried restarting and the load goes straight back to what it was at.
I have looked at mtop, but that seems to give about the same information as the process list.  I need something to gather data over time, there is nothing to see in real time because there are no queries sitting there lagging or it would be easier to figure out.
You could always use the general query log, I suppose.
I have seen software specifically made for this in the past, I am pretty sure it was open source, but I can't remember what it was.  It isn't something built in to mysql.
how about optimising your queries?

have you ever used the EXPLAIN command?

It will break down your request into the number of records that will be tested for a solution. This can often be reduced by adding a few indexes.... So rather than searching through 100,000 records, it may just need to search 6 records.

ie reduce server load by adding indexes to your tables, if required, to reduce the time of individual transaction.

I know all about that, and of course I have optimized my queries.  The problem here is that I don't know where the problem is, that is why I am asking for the name or link to the software needed to find the problem.  I don't need basic tips about mysql optimization, I am not new to this.
ASKER CERTIFIED SOLUTION
Avatar of Rob Siklos
Rob Siklos
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Mark Wills
Mark Wills
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>that is why I am asking for the name or link to the software<<

What was wrong with the post I provide - had a few choices there. Why have you requested this question be deleted ? It is a "common" occurance, and many people would like to know a possible solution.