The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mysql - high cpu usage!

Discussion in 'General Discussion' started by kaeonthibe, Apr 27, 2006.

  1. kaeonthibe

    kaeonthibe Registered

    Joined:
    Apr 27, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    This is my server info:
    GenuineIntel
    Intel(R) Dual Xeon(TM) CPU 2.80GHz
    2.8 GHz
    Cache size: 2048 KB

    It's very important for me to stop mysql eating CPU!!

    Check this image and you will see that it's not normal for mysql to eats CPU like this

    http://www.andraia.com/highmysqlcpu.gif

    This is my my.cnf...

    [mysqld]
    socket = /var/lib/mysql/mysql.sock
    skip-innodb
    key_buffer_size = 512M
    tmp_table_size = 256M
    query_cache_size = 0
    max_allowed_packet = 32M
    table_cache = 2048
    sort_buffer_size = 4M
    read_buffer_size = 2M
    join_buffer_size = 2M
    thread_cache_size = 10
    thread_concurrency = 2
    myisam_sort_buffer_size = 64M
    connect_timeout = 5
    max_connections = 500
    thread_stack = 65536
    long_query_time = 3
    log-slow-queries
    wait_timeout=30
    query_cache_type = 0

    [mysql.server]
    user=mysql
    basedir=/var/lib

    I tried everything... I changed my.cnf everytime and it does nothing... I need a solution.

    mysqld processes can reach sometime 99% of the CPU... It's NOT NORMAL!

    Don't ask for the queries, I tried to log slow queries which takes more than 3 secondes to be executed and it does nothing.
    The problem it's not with the queries but how the mysql is compiled or configured... Do you have an idea how can I do to stop mysql eating CPU like this...

    My website runs fast now but how will it be in couple of months when the amount of members will raise?
    And I need to transfer another website on my server, larger than the one which is already on my current server.

    PLEASE HELP!!
     
  2. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,367
    Likes Received:
    5
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
  3. kaeonthibe

    kaeonthibe Registered

    Joined:
    Apr 27, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Changed for this...

    No difference... :confused:
     
  4. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,367
    Likes Received:
    5
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Wasn't suggesting that you arbitrarily start changing my.cnf values based on the defaults, only that the values being used in your setup were considerably higher with no information about why they were set that way.

    IMLX tuning MySQL takes some patience and common sense. Other option is to hire someone that can trouble shoot and correct your configuration. Generally you will still need some base line information to work with.
     
  5. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Modifying the directives in your MySQL won't solve the current issue you have in hand. The problem is not MySQL, period. It might be a bad script exahusting many concurrent connetions which leads to a high server load and/or crashing your server.
     
  6. WebScHoLaR

    WebScHoLaR Well-Known Member

    Joined:
    Dec 14, 2005
    Messages:
    511
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Planet Earth
    I agree withe Andy too. You should check the users running extensive MySQL queries by mysqladmin processlist.
     
  7. kaeonthibe

    kaeonthibe Registered

    Joined:
    Apr 27, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    3 or 4 processes which taking 0 seconds to be executed :confused:

    And what is " concurrent connections" and how can I check them?
     
  8. kaeonthibe

    kaeonthibe Registered

    Joined:
    Apr 27, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hello...

    No one wants to help me? :confused:

    Please!
     
Loading...

Share This Page