Re: mysqld shows 10x cpu usage on one machine vs. another
> ... 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 ...
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
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
where engine is not null and engine not in('information_schema','performance_schema')
group by engine with rollup
order by list.ord desc;
(ii) post the results of running these queries in the mysql client program ...
show global status;