|
yutian209 发表于 2013-7-25 10:11 ![]()
可以再高些,64*0.8=51G
要考虑到max_connection,read_buffer_size,sort_buffer_size 等等,- SET @k_bytes = 1024;
- SET @m_bytes = @k_bytes * 1024;
- SET @g_bytes = @m_bytes * 1024;
- 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;
复制代码 超过总内存,MySQL 很容易挂掉。 |
|