MySQL Forums
Forum List  »  Performance

Re: CPU RAM and IO Usage
Posted by: Peter Brawley
Date: March 28, 2018 09:53PM

I know nothing about "jawsdb". For help on that, ask its makers.

Where MySQL is installed in a Linux system, you can get a snapshot of memory use by running free -m in the terminal while MySQL is running.

To get a snapshot of potential memory demand from your databases, run this query in MySQL ...

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;

For more detailed info about how your MySQL installation is using memory, run ...

show variables;

show global status;

and post the results here so we can run them through an analysis scrip.

To find queries that use RAM inefficiently, turn on the slow queries log, use the MySQL Explain cmd to analyse how those sloq queries should be optimised.



Edited 1 time(s). Last edit at 03/28/2018 10:31PM by Peter Brawley.

Options: ReplyQuote


Subject
Views
Written By
Posted
1063
March 28, 2018 08:24PM
Re: CPU RAM and IO Usage
641
March 28, 2018 09:53PM
485
March 29, 2018 03:18AM
477
March 29, 2018 11:36AM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

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.