Re: MySQL Performance

From: Steve Rieger (steve.rieger_at_tbwachiat.com)
Date: 08/02/05

  • Next message: Roman Volf: "Re: MySQL Performance"
    Date: Tue, 2 Aug 2005 10:37:23 -0400
    To: Troy Settle <troy@psknet.com>
    
    

    are you logging
    if so how large are your log files

    --
    Steve Rieger
    AIM chozrim
    ICQ 53956607
    Cell 646 335 8915
    steve.rieger@tbwachiat.com
    On Aug 2, 2005, at 10:24 AM, Troy Settle wrote:
    >
    > I've a 4-STABLE box on a Dual Xeon w/4GB and U320 RAID:
    >
    >  4.11-STABLE FreeBSD 4.11-STABLE #7: Fri Mar 11 20:24:25 EST 2005
    >  10:05AM  up 55 days, 14:38, 3 users, load averages: 1.07, 1.10, 1.13
    >
    > Running on this box, is MySQL 4.0.23a (a little outdated, I know).  
    > This MySQL server seems to run fine as long as I watch it, but as  
    > soon as I turn my head for a moment, it jumps up to ~97% CPU usage:
    >
    >  508 mysql     63   0    99M 51660K CPU0   0 306.9H 97.46% 97.46%  
    > mysqld
    >
    > It doesn't appear to be an IO issue, 300 samples from iostat show a  
    > max of 0.31 MB/s.
    >
    > It also doesn't appear to be a memory issue:
    >
    >  867M Active, 2354M Inact, 320M Wired, 192M Cache, 199M Buf, 40M Free
    >  Swap: 4096M Total, 16K Used, 4096M Free
    >
    > Through a number of samples from sockstat(1), I see ~20 connections  
    > to mysql at any given time.  5 for Courier's authdaemon, 3 for  
    > Exim, and ~12 for Apache/PHP.  There are intermitant connections  
    > from Windows clients using MyODBC, but none are persistant.   
    > Restarting any/all of these processes does not cause mysql to ease  
    > up on the CPU.  Only restarting MySQL will buy releif, but after a  
    > few weeks, it's right back to 97% CPU usage.
    >
    > The machine itself is completely responsive, mysql is completely  
    > responsive.  The tables in question are flat, with only a few  
    > thousand entries in the largest.  Queries range from simple to semi- 
    > complex.
    >
    > I can't identify the source of the load.  Can anyone help?  What  
    > should I be looking at?
    >
    > Thanks,
    >
    > --
    >   Troy Settle
    >   Pulaski Networks
    >   http://www.psknet.com
    >   866.477.5638
    > _______________________________________________
    > freebsd-isp@freebsd.org mailing list
    > http://lists.freebsd.org/mailman/listinfo/freebsd-isp
    > To unsubscribe, send any mail to "freebsd-isp-unsubscribe@freebsd.org"
    >
    >
    >
    This e-mail is intended only for the named person or entity to which it is addressed and contains valuable business information that is privileged, confidential and/or otherwise protected from disclosure.  Dissemination, distribution or copying of this e-mail or the information herein by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is strictly prohibited.  All contents are the copyright property of TBWA\Chiat\Day, its agencies or a client of such agencies.  If you are not the intended recipient, you are nevertheless bound to respect the worldwide legal rights of TBWA\Chiat\Day, its agencies and its clients.  We require that unintended recipients delete the e-mail and destroy all electronic copies in their system, retaining no copies in any media.  If you have received this e-mail in error, please immediately notify us via e-mail to disclaimer@tbwachiat.com.  We appreciate your cooperation.
    We make no warranties as to the accuracy or completeness of this e-mail and accept no liability for its content or use.  Any opinions expressed in this e-mail are those of the author and do not necessarily reflect the opinions of TBWA\Chiat\Day or any of its agencies or affiliates.
    _______________________________________________
    freebsd-isp@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-isp
    To unsubscribe, send any mail to "freebsd-isp-unsubscribe@freebsd.org"
    

  • Next message: Roman Volf: "Re: MySQL Performance"

    Relevant Pages

    • Re: MySQL Performance
      ... Try enabling slow query logging, as well as maybe try to isolate if the ... load is coming from any particular query... ... > MySQL server seems to run fine as long as I watch it, ... > to 97% CPU usage. ...
      (freebsd-isp)
    • Command-line PHP script CPU usage goes sky-high, stays there--why?
      ... I have a command-line PHP script--called Listener--that is designed to run indefinitely with a predictable CPU usage and memory footprint. ... In a nutshell, it's a multi-client socket server that waits for incoming connections, processes incoming data, stores results in a MySQL database, and basically gets on with its life. ... Basically, after the script has been running for a day or so, the CPU usage of the machine goes from 30% to 80-90%. ... The only thing I thought might be connected is how many short-lived PHP child processes Listener creates--around 20-30,000 per day. ...
      (php.general)
    • Re: MySQL Performance
      ... I've enabled logging and re-started the server. ... time, I hope to have a dedicated MySQL server up and running, though I'm ... > Check for slow queries though... ... >> back to 97% CPU usage. ...
      (freebsd-isp)
    • Re: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?
      ... RF> script is for some other purpose, ... the number of socket clients connecting in the past 3-4 ... RF> data that used to take two weeks), the CPU usage of the machine goes ... RF> cycles it's operated, data processed, MySQL queries executed, etc.). ...
      (php.general)
    • MySQL Performance
      ... MySQL server seems to run fine as long as I watch it, ... There are intermitant connections from Windows ... restarting MySQL will buy releif, but after a few weeks, it's right back ... to 97% CPU usage. ...
      (freebsd-isp)