Results 1 to 4 of 4

Thread: MYSQL over load

  1. #1
    Join Date
    May 2008
    Location
    India
    Posts
    198

    MYSQL over load

    Hi,

    We have 1 Dedicated box with 4 core processor and 4 GB RAM, our mysql server goes to high CPU load every now and then. In Load section of server we noted high usage of :
    /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var/lib/mysql/host.ourdomain.com.err --pid-file=/var/lib/mysql/host.ourdomain.com.err.pid

    on tracing the above PID :

    select(13, [10 12], NULL, NULL, NULL) = 1 (in [12])
    fcntl(12, F_SETFL, O_RDWR|O_NONBLOCK) = 0
    accept(12, {sa_family=AF_FILE, path=@""}, [8516025424675864578]) = 29
    fcntl(12, F_SETFL, O_RDWR) = 0
    getsockname(29, {sa_family=AF_FILE, path="/var/lib/mysql\1"...}, [8516025424675864604]) = 0
    fcntl(29, F_SETFL, O_RDONLY) = 0
    fcntl(29, F_GETFL) = 0x2 (flags O_RDWR)
    fcntl(29, F_SETFL, O_RDWR|O_NONBLOCK) = 0
    setsockopt(29, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not supported)
    gettimeofday({1291659138, 916921}, NULL) = 0
    clone(child_stack=0x44996250, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x449969d0, tls=0x44996940, child_tidptr=0x449969d0) = 18570

    can someone help us on whats going on ?

  2. #2
    Join Date
    May 2008
    Location
    Sweden
    Posts
    152
    you just pasted strace output. It contains all the system calls called by the process. Basically I think you are on a wrong path.

    You should check the mysql logs and mysql status to understand which user or which query is causing the issue. From my experiance I can say that it should be a very long select query and mysql creates a temporary table for that query and it causes i/o.

    Please check iostat also.
    Linux, C, Perl, Bash, PHP
    MySQL, PostgreSQL
    Postfix, Qmail
    Bind

  3. #3
    Join Date
    Mar 2009
    Location
    Gods Own Country
    Posts
    681
    try running mtop when there is load and you can find the queries that take cpu load.
    Fabin Mundattil @ Xieles Support
    High Quality Server Management | support @ xieles.com
    https://xieles.com

  4. #4
    Join Date
    Oct 2009
    Location
    San Francisco, CA
    Posts
    56
    I'd recommend checking out http://mysqltuner.pl/mysqltuner.pl as well. More than likely you're IO-bound, but run mysqltuner and you'll have a better idea of what's up.

    John
    Stratosec Secure Cloud Services
    Secure Cloud Services for Finance and Healthcare

Similar Threads

  1. hi load from mysql
    By INNOFLAME in forum Hosting Security and Technology
    Replies: 11
    Last Post: 03-12-2008, 08:18 AM
  2. mysql load
    By Zion Ahead in forum Hosting Security and Technology
    Replies: 7
    Last Post: 11-27-2006, 05:00 PM
  3. Replies: 19
    Last Post: 10-16-2006, 01:45 AM
  4. need help with mysql and load
    By topmelody in forum Hosting Security and Technology
    Replies: 6
    Last Post: 01-15-2006, 06:48 AM
  5. PHP load or mysql load?
    By klasje in forum Programming Discussion
    Replies: 6
    Last Post: 09-09-2005, 01:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •