High CPU usage for /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid

Operating System & Version
Linux

sanzatg

Registered
Jul 11, 2021
2
0
1
Ghana
cPanel Access Level
Root Administrator
I have 100.16% or more most times for /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid CPU usage.

mysqladmin processlist gave the following results:


+-------+---------------------+-----------+---------------------+---------+------+-----------+------------------------------------------------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-------+---------------------+-----------+---------------------+---------+------+-----------+------------------------------------------------------------------------------------------------------+
| 28484 | tv24hr_musicliberia | localhost | tv24hr_musicliberia | Sleep | 19 | | |
| 28592 | asembi_abtc | localhost | asembi_abtc | Sleep | 1 | | |
| 28593 | tv24hr_musicliberia | localhost | tv24hr_musicliberia | Sleep | 1 | | |
| 28594 | tv24hr_musicliberia | localhost | tv24hr_musicliberia | Sleep | 1 | | |
| 28602 | asembi_abtc | localhost | asembi_abtc | Query | 0 | query end | INSERT INTO `wp_6v4bk6s5y2_options` (`option_name`, `option_value`, `autoload`) VALUES ('rocket_rucs |
| 28606 | tv24hr_musicliberia | localhost | tv24hr_musicliberia | Sleep | 1 | | |
| 28609 | asembi_abtc | localhost | asembi_abtc | Query | 0 | query end | UPDATE `wp_6v4bk6s5y2_wpr_rucss_resources` SET `url` = 'https://abtc.ng/wp-includes/js/jquery/jquery |
| 28611 | asembi_abtc | localhost | asembi_abtc | Sleep | 0 | | |
| 28612 | asembi_abtc | localhost | asembi_abtc | Sleep | 0 | | |
| 28613 | tv24hr_edu | localhost | tv24hr_edu | Sleep | 0 | | |
| 28614 | root | localhost | | Query | 0 | starting | show processlist


Can someone assist me with what to do?
 

HostNoc

Well-Known Member
Feb 20, 2020
83
12
8
Ontario
cPanel Access Level
Root Administrator
Hi
From the stats you shared, it seems your mysql query goes in to sleep status and it did not execute, so please check your queies which is going in sleep mode and optimize it
regards
 
  • Like
Reactions: cPRex

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,923
912
313
cPanel Access Level
Root Administrator
I agree with the "sleep" state issue, but you may want to try this slightly different command to get a summary of what is happening on the server as well:

Code:
mysqladmin proc status
as this will give you an overview of what the MySQL server is processing on the machine in real-time.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,923
912
313
cPanel Access Level
Root Administrator
We have a list of admins that advertise their specialty with cPanel servers here:


We can't recommend anyone in particular but there are reviews and ratings on that page as well.