Re: mysqld shows 10x cpu usage on one machine vs. another
Posted by: Peter Brawley
Date: September 30, 2018 04:20PM

> ... 40M of CPU ...

Unclear. CPU usage is not measured in M's, it's measured in %.

Depending on settings, MySQL memory use will often be in the hundreds of MB, eg the little laptop on which I'm writing this reply runs MySQL 5.6 to manage a few databases, and whilst doing "nothing" uses 460MB RAM.

Slow query response does not correlate with memory use unless memory use is big enough to require swap file use, which is a performance killer. So you need to tune your 8.0 installation, which will require enabling the slow query log so you can optimise the slow queries. The manual is very clear on how to enabke the slow query log.

If you need more tuning help, post here the amount of RAM in the 8.0 machine, the amount of free RAM without MySQL running, and ...

(i) post the result of ...

select engine,data,indexes,total
from (
  select 
    ifnull(engine,'TOTALS') as engine, 
    concat(data,' GB') as data, 
    concat(indexes,' GB') as indexes, 
    concat(tot,' GB') as total,
    if(engine is null,-1,tot) as ord
  from (
    select   
      engine,  
      round( sum(data_length)/1024/1024/1024, 2 ) as data,  
      round( sum(index_length)/1024/1024/1024, 2 ) as indexes,  
      round( sum(data_length+index_length)/1024/1024/1024, 2 ) as tot
    from information_schema.tables
    where engine is not null and engine not in('information_schema','performance_schema')
    group by engine with rollup
  ) sums
) list
order by list.ord desc;

(ii) post the results of running these queries in the mysql client program ...

show variables;

show global status;

Options: ReplyQuote


Subject
Written By
Posted
Re: mysqld shows 10x cpu usage on one machine vs. another
September 30, 2018 04:20PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.