List:General Discussion« Previous MessageNext Message »
From:Jim Faucette Date:May 6 1999 3:15pm
Subject:Re: Identifiying slow queries
View as plain text  
Michael Griffith wrote:
> 
> I operate a fairly active mysql/apache driven web site. Most of the time our
> BSDI / Pentium can handle the load. The mysql daemon typically uses 20-30%
> of the processor. However, at seemingly random intervals throughout the day,
> mysqld begins to consume 80-90% or more. Once it start rising to this
> extreme, it just keeps rising. Sometimes it finishes whatever it's doing buy
> usually keeps rising until mysqld takes the all the machines resources
> (time, not memory) and eventually dies.
> 
> I think queries are still going on while it seems frozen, but in the process
> of tying up resources, the backlog becomes so great that it's only choice is
> to crash. This happens sometimes in the middle of the night or other times,
> when the server load is almost non-existent.
> 
> On BSDI I had even more problems before starting with "--skip-locking" and
> "--skip-thread-priority," so I can't turn those back on. It's possible that
> it could be a single query, but if so, I've been completely unsuccessful at
> determining which one by following logs.
> 
> Anyone out there know any secrets to identifying the "slow queries" that
> mysqladmin reports. If I could run mysqladmin during the crash it might
> help, but when things get tied up, it won't run either.
> 
> Any suggestions appreciated

Michael,
  Start mysql at the commandline as a user with process privs. Then when
the server starts hogging cpu:
show processlist;
  
  jim...
Thread
Identifiying slow queriesMichael Griffith6 May
  • Re: Identifiying slow queriesJim Faucette6 May