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.