Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Mysql 600% CPU usage

Discussion in 'Workarounds and Optimization' started by Patricio Segovia, Mar 7, 2017.

  1. Patricio Segovia

    Joined:
    Feb 27, 2017
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Chile
    cPanel Access Level:
    Root Administrator
    This its my my.cnf file:

    [mysqld]
    max_connections = 200
    query_cache_type = 1
    query_cache_size = 256M
    query_cache_limit = 2M
    performance-schema = 0
    local-infile = 0
    tmpdir=/mysqltmp
    wait_timeout = 120
    interactive_timeout = 120
    sort_buffer_size = 2G
    myisam_sort_buffer_size = 2G
    default-storage-engine=MyISAM
    innodb_file_per_table = 1
    max_allowed_packet = 268435456
    open_files_limit=12000
    key_buffer_size = 2G
    read_buffer_size = 16M

    My server its a xeon 8 core and 8 gb ram.

    What i did wrong?

    Regards!
     
  2. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    703
    Likes Received:
    114
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    It most likely has nothing to do with your mysql configuration.

    You have to check the queries to see what is causing the usage:

    Code:
    # mysqladmin proc
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    920
    Likes Received:
    13
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    Maybe nothing, you should install something to monitor your MySQL processes and find out who/what is causing the load. mytop - a top clone for MySQL
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    604
    Likes Received:
    42
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    You have to optimize MySQL by using mysqltuner script and update the my.cnf record as per the mysqltuner.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You'd need to first verify if any specific databases or tables are leading to the excessive resource usage. You can do this via the use of a command such as "mysqladmin processlist", as mentioned in the earlier posts to this thread.

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    703
    Likes Received:
    114
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    You can tune it as much as you want, this more than likely has nothing to do with tuning.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice