检查配置所需内存
SET @k_bytes = 1024;
SET @m_bytes = @k_bytes * 1024;
SET @g_bytes = @m_bytes * 1024;
SET @innodb_buffer_pool_size = 3 * @g_bytes;
SET @innodb_additional_mem_pool_size = 20 * @m_bytes;
SET @innodb_log_buffer_size = 20 * @m_bytes;
SET @thread_stack = 192 * @k_bytes;
SELECT
( @@key_buffer_size + @@query_cache_size + @@tmp_table_size
+ @innodb_buffer_pool_size + @innodb_additional_mem_pool_size
+ @innodb_log_buffer_size
+ @@max_connections * (
@@read_buffer_size + @@read_rnd_buffer_size + @@sort_buffer_size
+ @@join_buffer_size + @@binlog_cache_size + @thread_stack
) ) / @g_bytes AS MAX_MEMORY_USED_GB;
摘抄自
阅读(1419) | 评论(0) | 转发(0) |