[Ilugc] server load

  • From: rajasuperman@xxxxxxxxx (Raja Subramanian)
  • Date: Tue Jun 17 03:09:39 2008

On Mon, Jun 16, 2008 at 12:22 PM, Deepan Chakravarthy
<codeshepherd@xxxxxxxxx> wrote:

     I have noticed huge spikes in server load recently.   Load average
sometimes hits 50.0 ; however after removing unwanted mail alerts from cron
load has dropped to  2.0 to 5.0;    I guess even 2.0 is a high load for the
kind of usage I have.   Mysqld seems to top in CPU usage.
mysqladmin processlist  always reports a dead thread. How do I flush these
dead threads ?

Optimize your SQL queries and tables.  "SELECT * FROM foo" is never good
practice as it may force a full table scan and cause heavy disk IO.  The slow
query log can help you identify the hot spots.  Google "mysql slow queries".

If you have large tables this is a really painful problem.  I used to run
Request Tracker with a +25GB MySQL 4.x backend.  Complex RT searches
could send MySQL spinning forever.  Over time we learnt to tune our tables
and sanitize user queries.  Many times the only way out was to simply restart
MySQL.

Btw, don't forget to check the MySQL bug tracker for any solutions/patches.

- Raja

Other related posts: