登录 注册
当前位置:主页 > 资源下载 > 10 > MySQL性能优化技术总结-服务器硬件优化环节中内存的选择

MySQL性能优化技术总结-服务器硬件优化环节中内存的选择

  • 更新:2024-07-18 09:31:38
  • 大小:2.14MB
  • 推荐:★★★★★
  • 来源:网友上传分享
  • 类别:SUN - 存储
  • 格式:PPT

资源介绍

服务器硬件优化-内存的选择 物理内存*75%= SET @kilo_bytes = 1024; SET @mega_bytes = @kilo_bytes * 1024; SET @giga_bytes = @mega_bytes * 1024; SET @innodb_buffer_pool_size = 2 * @giga_bytes; SET @innodb_additional_mem_pool_size = 16 * @mega_bytes; SET @innodb_log_buffer_size = 8 * @mega_bytes; SET @thread_stack = 192 * @kilo_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 ) ) / @giga_bytes AS MAX_MEMORY_GB;