Home > database >  Memory is high and growing 1 g
Memory is high and growing 1 g

Time:09-21

The current memory:
- see how much memory each thread take up and then multiplied by a running thread (that is, trying to sleep),
SELECT ((@ @ read_buffer_size
+ @ @ read_rnd_buffer_size
+ @ @ sort_buffer_size
+ @ @ join_buffer_size
+ @ @ binlog_cache_size
+ @ @ thread_stack
+ @ @ max_allowed_packet
+ @ @ net_buffer_length)
)/(1024 * 1024) AS MEMORY_MB;

Results: 136.2656

Select count (*) from information_schema. The PROCESSLIST

Results: 154

- see how much memory MySQL global footprint
Select (@ @ innodb_buffer_pool_size
+ @ @ innodb_log_buffer_size
+ @ @ key_buffer_size)/1024/1024/1024 AS MEMORY_MB;

Results: 64.515625

How much memory - check each component takes
The SELECT SUBSTRING_INDEX (event_name, '/', 2) the AS
Code_area, sys. Format_bytes (SUM (current_alloc))
AS current_alloc
The FROM sys. X $memory_global_by_current_bytes
GROUP BY SUBSTRING_INDEX (event_name, '/', 2)
The ORDER BY the SUM (current_alloc) DESC;

Results: 203.37 the MiB

How much memory footprint - to check the memory storage engine
Select sum (max_data_length)/1024/1024 as MEMORY_MB from tables where engine='memory';

Results: 1631.92932415

Always use the memory: (136.2656 * 154 + 203)/1024 + 64.515625=85.20 G

However, the current server USES memory 91 g,
Query table memory performance, found that there are a large number of abnormal statistics (why release the memory is greater than the use, see picture)

CodePudding user response:

400 duck, brothers

CodePudding user response:

Is your database engine MEMOERY?

CodePudding user response:

reference generation o f the princess reply:
MEMOERY your database engine is?
is the innodb engine,
  • Related