I'm managing a db server for a lot of people connecting to it and one of the tools we are using is not well optimized so it uses a lot of JOIN queries without indexes.
The problem is that lately we've being experimenting some crashes because the InnoDB buffer pool reached 90~95%, so I had to check if MySQL needed more pool size so I ran:
SELECT CEILING(Total_InnoDB_Bytes*1.6/POWER(1024,3)) RIBPS FROM
(SELECT SUM(data_length+index_length) Total_InnoDB_Bytes
FROM information_schema.tables WHERE engine='InnoDB') A;
and it returned me:
+-------+
| RIBPS |
+-------+
| 33 |
+-------+
1 row in set, 48 warnings (0.19 sec)
so I need innodb_buffer_pool_size
to be 33G and this has to be around a 60~70% of my total RAM. Ok, it seems a pretty high value but, I have no problem with this so I set the RAM in that VM to 64G.
QUESTION
I'm seeing and checking every day the InnoDB buffer usage value and now, after 16 days running it sits at 39%, but it's still getting higher everyday and it won't decrease. It will reach the >90%? It will crash again?
These are some of the variables I've set in the mysql.cnf
file:
innodb_buffer_pool_instances = 44
innodb_buffer_pool_size = 42G
innodb_flush_method = O_DIRECT
innodb_log_file_size = 5G
innodb_page_cleaners = 4
innodb_purge_threads = 4
innodb_read_io_threads = 64
innodb_thread_concurrency = 0
innodb_write_io_threads = 64
max_connections = 512
open_files_limit = 262144
table_open_cache = 131072
innodb_io_capacity = 1900
thread_cache_size = 100
read_rnd_buffer_size = 128K
read_buffer_size = 128K
I need to know which variables should I adjust or tune to keep it stable and if it's necessary to flush or clear that buffer pool.