Mysql – thesql innodb buffer pool instances always 1

MySQL

I set in my.ini

innodb_buffer_pool_instances=8

However, no matter how I change the innodb buffer pool size. I check the
innodb_buffer_pool_instances in mysql workbench, it always equal to 1. I cannot find a way to change the instances number. What is wrong? I am using Mysql 5.7.12.

Best Answer

The default values for innodb_buffer_pool_instances is explained in the official MySQL Documentation:

Default Value (Other) : 8 (or 1 if innodb_buffer_pool_size < 1GB)

Default Value (Windows, 32-bit platforms) : (autosized)

So, if your innodb_buffer_pool_size is less than 1 GB, innodb_buffer_pool_instance will always be reset to 1.

Moreover, since you mentioned my.ini file, it indicates that you are using Windows. If your Windows is 32-bit, then MySQL auto-determines this value, and thus changing it in my.ini won't affect anything. The rules are:

  • If innodb_buffer_pool_size is greater than 1.3GB, the default for innodb_buffer_pool_instances is innodb_buffer_pool_size/128MB, with individual memory allocation requests for each chunk. 1.3GB was chosen as the boundary at which there is significant risk for 32-bit Windows to be unable to allocate the contiguous address space needed for a single buffer pool.

  • Otherwise, the default is 1.