Skip to main content

mysqld is eating CPU at average of 300%

Comments

5 comments

  • kodeslogic
    Do you see any database appearing multiple times using the below command? #mysqladmin proc stat
    0
  • cPRex Jurassic Moderator
    That's always my go-to check @kodeslogic !
    0
  • mr.p3rfekt
    Do you see any database appearing multiple times using the below command? #mysqladmin proc stat

    YES I do see this: [root@host ~]# mysqladmin proc stat +--------+--------------+-----------+--------------+---------+------+--------------------------+------------------------------------------------------------------------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +--------+--------------+-----------+--------------+---------+------+--------------------------+------------------------------------------------------------------------------------------------------+----------+ | 1 | system user | | | Daemon | | InnoDB purge worker | | 0.000 | | 2 | system user | | | Daemon | | InnoDB purge coordinator | | 0.000 | | 3 | system user | | | Daemon | | InnoDB purge worker | | 0.000 | | 4 | system user | | | Daemon | | InnoDB purge worker | | 0.000 | | 5 | system user | | | Daemon | | InnoDB shutdown handler | | 0.000 | | 400076 | halabtech_ar | localhost | HTT_ar | Query | 0 | Sending data | SELECT option_value FROM wp_options WHERE option_name = '_transient_global_styles_svg_filters_mharty | 0.000 | | 400077 | HTT_ar | localhost | HTT_ar | Query | 0 | Sending data | SELECT option_value FROM wp_options WHERE option_name = 'mh_magazine_activated' LIMIT 1 | 0.000 | | 400078 | HTT_ar | localhost | HTT_ar | Query | 0 | Sending data | SELECT option_value FROM wp_options WHERE option_name = 'mh_magazine_activated' LIMIT 1 | 0.000 | | 400079 | HTT_ar | localhost | HTT_ar | Query | 0 | Sending data | SELECT option_value FROM wp_options WHERE option_name = 'fb_app_auth_token' LIMIT 1 | 0.000 | | 400080 | HTT_ar | localhost | HTT_ar | Query | 0 | Sending data | SELECT option_value FROM wp_options WHERE option_name = 'fb_app_auth_token' LIMIT 1 | 0.000 | | 400081 | root | localhost | | Query | 0 | Init | show processlist
    0
  • kodeslogic
    The current output you shared looks normal, try the same command when CPU usage is 700% that time you will be able to detect/identify the database consuming high resources.
    0
  • anton_latvia
    I would change these settings in your my.cnf query_cache_limit = 512Kb # no need to have it big. it will just eat all RAM with low efficiency query_cache_size = 128M # of even 64M. Query cache gets really slow when it is bigger than 128Mb. innodb_buffer_pool_size = 8G # you have enough RAM, let InnoDB use it.
    0

Please sign in to leave a comment.