全局内存
=
innodb_buffer_pool_size+
innodb_additional_mem_pool_size+
innodb_log_buffer_size+
key_buffer_size+
query_cache_size+
table_open_cache+
table_definition_cache+
thread_cache_size
线程内存=max_threads_num*(
binlog_cache_size+
thread_stack+
read_buffer_size+
read_rnd_buffer_size+
sort_buffer_size+
join_buffer_size+
tmp_table_size+
net_buffer_length+
bulk_insert_buffer_size
)