好文分享: 10 MySQL settings to tune after installation
在 PERCONA MYSQL PERFORMANCE BLOG 看到这篇文章, 觉得很不错, 其中在文章开始时作者提到一些建议很实用。
— Change one setting at a time! This is the only way to estimate if a change is beneficial.
— Most settings can be changed at runtime with SET GLOBAL. It is very handy and it allows you to quickly revert the change if it creates any problem. But in the end, you want the setting to be adjusted permanently in the configuration file.
— A change in the configuration is not visible even after a MySQL restart? Did you use the correct configuration file? Did you put the setting in the right section? (all settings in this post belong to the [mysqld] section)
— The server refuses to start after a change: did you use the correct unit? For instance, innodb_buffer_pool_size should be set in bytes while max_connection is dimensionless.
— Do not allow duplicate settings in the configuration file. If you want to keep track of the changes, use version control.
— Don’t do naive math, like “my new server has 2x RAM, I’ll just make all the values 2x the previous ones”..
这些建议不单单适用在 MySQL, 在其他地方修改设定同样也适用。