High CPU usage for /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
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` = '
-
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 0 -
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: mysqladmin proc status
as this will give you an overview of what the MySQL server is processing on the machine in real-time.0 -
Any idea where I can find an expert to look into this for me? 0 -
mysqladmin proc status
as this will give you an overview of what the MySQL server is processing on the machine in real-time.
I am also seeing the same on my server. But when running the code for real time all seems ok. Screenshot But yet Sql is using 32% of memory. Screenshot0 -
I see your open_tables is sitting at 2000. Is that the limit on your server? You can fun this command directly from SSH to see that number: mysql -e "show variables;" | grep table_open_cache
If that is set to 2000 and you're hitting your limit, consider raising that value. This should let MySQL use more RAM, but less CPU.0 -
Thanks for getting back to me. I did run this command and can see that my limit is set to 2000 ModSecurity" Tools " - Screenshot &
0 -
I"ve same issue 0 -
@retechpro - did you try the checks I mentioned? 0 -
@khnaz35 - it would be best to start a new thread for the ModSecurity issues. However, the files don't need to exist on your server for a rule to be tripped. 0
Please sign in to leave a comment.
Comments
10 comments