0

On a mysql server with fairly low load, I can see my mysql process using 150% CPU on htop and the system load around 1.5 at all times - sometimes spiking well over 2

The VM has 8 cores assigned to it and a lot of spare RAM, although, id does not seem to be using all the cores concurrently.

The service does not seem to be affected, but I don't like that load numbers.

How can I improve the CPU usage so I can reduce hose load numbers?

  • Additional information request. RAM size, any SSD or NVME devices on MySQL Host server? Post on pastebin.com and share the links. A) complete (not edited) my.cnf or my.ini From your SSH login root, Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) SHOW FULL PROCESSLIST; for server workload tuning analysis to provide suggestions. – Wilson Hauck Mar 07 '20 at 16:42

1 Answers1

0
  • 150% CPU = 1.5 "load average" (sometimes). So, I don't see the inconsistency.
  • MySQL uses only one CPU per connection.
  • Your 150% and 1.5 indicate inefficient queries. Let's see the queries, EXPLAIN SELECT and SHOW CREATE TABLE. We can probably help you make them more efficient.
Rick James
  • 2,463
  • 1
  • 6
  • 13