天天看點

innodb_log_buffer_size和innodb_buffer_pool_size參數說明

innodb_log_buffer_size     Command-Line Format	--innodb_log_buffer_size=#     System Variable	Name	innodb_log_buffer_size     Variable Scope	Global     Dynamic Variable	No     Permitted Values	Type	integer     Default	8388608     Min Value	262144     Max Value	4294967295     The size in bytes of the buffer that InnoDB uses to write to the log files on disk.     The default value is 8MB. A large log buffer enables large transactions to run without a need to write the log to disk before the transactions commit.      Thus, if you have transactions that update, insert, or delete many rows, making the log buffer larger saves disk I/O.     For general I/O tuning advice, see Section 8.5.8, “Optimizing InnoDB Disk I/O”.     buffer 大小機關bytes,InnoDB 用于寫log files 到磁盤,預設值是8M,     一個大的log buffer 讓一個大的事務運作不需要寫日志到磁盤在事務送出前,是以,如果你有事務比如update,insert或者delete 很多的記錄, 讓log buffer 足夠大來節約磁盤I/O.     對于正常的I/O 調優建議,see Section 8.5.8, “Optimizing InnoDB Disk I/O”.     The size in bytes of the buffer pool, the memory area where InnoDB caches table and index data. The default value is 128MB.      The maximum value depends on the CPU architecture; the maximum is 4294967295 (232-1) on 32-bit systems and 18446744073709551615 (264-1) on 64-bit systems.      On 32-bit systems, the CPU architecture and operating system may impose a lower practical maximum size than the stated maximum.     buffer pool 的大小機關位元組, InnoDB 的記憶體區域用于cached 表和索引資料,預設是128MB。     最大值依賴CPU 結構, maximum是 4294967295 (232-1) 在32位系統上  在64位系統上是 18446744073709551615 (264-1)     在32位系統上,CPU 結構和作業系統可能施加較低的實際的最大值 相比規定的最大值     When the size of the buffer pool is greater than 1GB, setting innodb_buffer_pool_instances to a value greater than 1 can improve the scalability on a busy server.     The larger you set this value, the less disk I/O is needed to access the same data in tables more than once. On a dedicated database server,     you might set this to up to 80% of the machine physical memory size. Be prepared to scale back this value if these other issues occur:     Competition for physical memory might cause paging in the operating system.     當 buffer pool 大小大于1GB,設定innodb_buffer_pool_instances 大于1來改善 可擴充性在一個繁忙的server上     值你設定的越大,越少的disk I/O 通路相同的資料, 在一個專用的database server.     你可以設定最多到80%的機器實體記憶體大小,實體記憶體的競争可能導緻作業系統中的交換     InnoDB reserves additional memory for buffers and control structures, so that the total allocated space is approximately 10% greater than the specified size.     The address space must be contiguous, which can be an issue on Windows systems with DLLs that load at specific addresses.     The time to initialize the buffer pool is roughly proportional to its size. On large installations, this initialization time might be significant.     For example, on a modern Linux x86_64 server, initialization of a 10GB buffer pool takes approximately 6 seconds. See Section 8.10.1, “The InnoDB Buffer Pool”.     InnoDB儲備額外的記憶體用于緩沖區和控制結構, 是以總共配置設定的空間是大約10%大于指定值。     位址空間必須是連續的, 在Windows上可能是一個問題用DLLs來加載特定的位址