MySQL Forums
Forum List  »  Performance

Re: Mysql 8 memory leak
Posted by: Peter Brawley
Date: September 17, 2019 07:14PM

MySQL 8.0.17? (There's a mem bug in earlier 8.0.x).

When you close all connections and don't restart, does reported memory use decrease to what you'd expect?

While mem use is growing let's see results of ...

select * from sys.memory_global_total;

select 
  substring_index(event_name,'/',2) as code_area, 
  sys.format_bytes( sum(current_alloc) ) as current_alloc 
from sys.x$memory_global_by_current_bytes 
group by substring_index(event_name,'/',2) 
order by sum(current_alloc) desc;

select
  @@innodb_ft_total_cache_size, 
  @@innodb_additional_mem_pool_size,  
  @@innodb_log_buffer_size,  
  @@tmp_table_size,  
  @@key_buffer_size,  
  @@max_connections,   
  @@thread_stack,  
  @@max_allowed_packet, 
  @@net_buffer_length,  
  @@net_buffer_length, 
  @@read_buffer_size, 
  @@read_rnd_buffer_size, 
  @@join_buffer_size\G

set @maxbytes =  
  @@innodb_ft_total_cache_size + @@innodb_additional_mem_pool_size + 
  @@innodb_log_buffer_size + @@tmp_table_size + @@key_buffer_size + 
  @@max_connections * ( @@thread_stack + 
                        greatest( @@max_allowed_packet, @@net_buffer_length ) + 
                        @@net_buffer_length + @@read_buffer_size + @@read_rnd_buffer_size + 
                        @@sort_buffer_size + @@join_buffer_size 
                      ) ;
select round( @maxbytes/1024/1024/1024, 2 ) as maxG;

... and look for runaway mem use in results of ...

select *
from performance_schema.memory_summary_global_by_event_name
where event_name like 'memory/performance_schema/%';



Edited 1 time(s). Last edit at 09/17/2019 07:15PM by Peter Brawley.

Options: ReplyQuote


Subject
Views
Written By
Posted
1932
September 17, 2019 03:58PM
Re: Mysql 8 memory leak
751
September 17, 2019 07:14PM
1470
September 18, 2019 02:41AM
716
September 18, 2019 02:44AM
737
September 18, 2019 09:38AM
708
September 19, 2019 04:56AM


Sorry, you can't reply to this topic. It has been closed.

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.