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 600% CPU usage

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

  1. Patricio Segovia

    Joined:
    Feb 27, 2017
    Messages:
    5
    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:
    588
    Likes Received:
    88
    Trophy Points:
    153
    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
     
  3. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    897
    Likes Received:
    12
    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
     
  4. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    542
    Likes Received:
    39
    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.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,995
    Likes Received:
    1,275
    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!
     
  6. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    588
    Likes Received:
    88
    Trophy Points:
    153
    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.
     
Loading...

Share This Page