•No change buffering is done, in particular no merges from the change buffer. To make sure the change buffer is empty when you prepare the instance for read-only operation, disable change buffering ( innodb_change_buffering=0 ) and do a slow shutdown first. 

•There is no crash recovery phase at startup. The instance must have performed a slow shutdown before being put into the read-only state. 

•Because the redo log is not used in read-only operation, you can set innodb_log_file_size  to the smallest size possible (1 MB) before making the instance read-only. 

•Most background threads are turned off. I/O read threads remain, as well as I/O write threads and a page flush coordinator thread for writes to temporary files, which are permitted in read-only mode. A buffer pool resize thread also remains active to enable online resizing of the buffer pool. 

•Information about deadlocks, monitor output, and so on is not written to temporary files. As a consequence, SHOW ENGINE INNODB STATUS  does not produce any output. 

•Changes to configuration option settings that would normally change the behavior of write operations, have no effect when the server is in read-only mode. 

•The MVCC processing to enforce isolation levels is turned off. All queries read the latest version of a record, because update and deletes are not possible. 

•The undo log is not used. Disable any settings for the innodb_undo_tablespaces  and innodb_undo_directory  configuration options. 

## 15.8.3 InnoDB Buffer Pool Configuration 

This section provides configuration and tuning information for the InnoDB  buffer pool. 

## 15.8.3.1 Configuring InnoDB Buffer Pool Size 

You can configure InnoDB  buffer pool size offline or while the server is running. Behavior described in this section applies to both methods. For additional information about configuring buffer pool size online, see Configuring InnoDB Buffer Pool Size Online. 

When increasing or decreasing innodb_buffer_pool_size , the operation is performed in chunks. Chunk size is defined by the innodb_buffer_pool_chunk_size  configuration option, which has a default of 128M . For more information, see Configuring InnoDB Buffer Pool Chunk Size. 

Buffer pool size must always be equal to or a multiple of innodb_buffer_pool_chunk_size * innodb_buffer_pool_instances . If you configure innodb_buffer_pool_size to a value that is not equal to or a multiple of innodb_buffer_pool_chunk_size  * innodb_buffer_pool_instances , buffer pool size is automatically adjusted to a value that is equal to or a multiple of innodb_buffer_pool_chunk_size  * innodb_buffer_pool_instances . 

In the following example, innodb_buffer_pool_size  is set to 8G , and innodb_buffer_pool_instances  is set to 16 . innodb_buffer_pool_chunk_size  is 128M , which is the default value. 

8G  is a valid innodb_buffer_pool_size  value because 8G  is a multiple of innodb_buffer_pool_instances=16  * innodb_buffer_pool_chunk_size=128M , which is 2G . 

shell> mysqld --innodb-buffer-pool-size=8G --innodb-buffer-pool-instances=16 

mysql> SELECT @@innodb_buffer_pool_size/1024/1024/1024; +------------------------------------------+ | @@innodb_buffer_pool_size/1024/1024/1024 | +------------------------------------------+ 

