When innodb_dedicated_server is enabled, InnoDB automatically configures the following variables:
-
Note
innodb_log_file_sizeandinnodb_log_files_in_groupare deprecated, and are superseded byinnodb_redo_log_capacity.
Only consider enabling innodb_dedicated_server if the MySQL instance resides on a dedicated server where it can use all available system resources. For example, consider enabling innodb_dedicated_server if you run MySQL Server in a Docker container or dedicated VM that only runs MySQL. Enabling innodb_dedicated_server is not recommended if the MySQL instance shares system resources with other applications.
The information that follows describes how each variable is automatically configured.
-
Buffer pool size is configured according to the amount of memory detected on the server.
Table 17.8 Automatically Configured Buffer Pool Size
Detected Server Memory Buffer Pool Size Less than 1GB 128MB (the default value) 1GB to 4GB detected server memory* 0.5Greater than 4GB detected server memory* 0.75 -
Redo log capacity is configured according to the amount of memory detected on the server and, in some cases, whether
innodb_buffer_pool_sizeis configured explicitly. Ifinnodb_buffer_pool_sizeis not configured explicitly, the default value is assumed.WarningAutomatic redo log capacity configuration behavior is undefined if
innodb_buffer_pool_sizeis set to a value larger than the detected amount of server memory.Table 17.9 Automatically Configured Log File Size
Detected Server Memory Buffer Pool Size Redo Log Capacity Less than 1GB Not configured 100MB Less than 1GB Less than 1GB 100MB 1GB to 2GB Not applicable 100MB 2GB to 4GB Not configured 1GB 2GB to 4GB Any configured value round(0.5 * detected server memoryin GB) * 0.5 GB4GB to 10.66GB Not applicable round(0.75 * detected server memoryin GB) * 0.5 GB10.66GB to 170.66GB Not applicable round(0.5625 * detected server memoryin GB) * 1 GBGreater than 170.66GB Not applicable 128GB -
innodb_log_file_size(deprecated)Log file size is configured according to the automatically configured buffer pool size.
Table 17.10 Automatically Configured Log File Size
Buffer Pool Size Log File Size Less than 8GB 512MB 8GB to 128GB 1024MB Greater than 128GB 2048MB -
innodb_log_files_in_group(deprecated)The number of log files is configured according to the automatically configured buffer pool size.
Table 17.11 Automatically Configured Number of Log Files
Buffer Pool Size Number of Log Files Less than 8GB round( buffer pool size)8GB to 128GB round( buffer pool size* 0.75)Greater than 128GB 64
NoteThe minimum
innodb_log_files_in_groupvalue of 2 is enforced if the rounded buffer pool size value is less than 2GB. -
The flush method is set to
O_DIRECT_NO_FSYNCwheninnodb_dedicated_serveris enabled. If theO_DIRECT_NO_FSYNCsetting is not available, the defaultinnodb_flush_methodsetting is used.InnoDBusesO_DIRECTduring flushing I/O, but skips thefsync()system call after each write operation.Warningfsync()is called after creating a new file, after increasing file size, and after closing a file, to ensure that file system metadata changes are synchronized. Thefsync()system call is still skipped after each write operation.Data loss is possible if redo log files and data files reside on different storage devices, and an unexpected exit occurs before data file writes are flushed from a device cache that is not battery-backed. If you use or intend to use different storage devices for redo log files and data files, and your data files reside on a device with a cache that is not battery-backed, use
O_DIRECTinstead.
If an automatically configured option is configured explicitly in an option file or elsewhere, the explicitly specified setting is used, and a startup warning similar to this is printed to stderr:
[Warning] [000000] InnoDB: Option innodb_dedicated_server is ignored for innodb_buffer_pool_size because innodb_buffer_pool_size=134217728 is specified explicitly.
Explicit configuration of one option does not prevent the automatic configuration of other options.
If innodb_dedicated_server is enabled and innodb_buffer_pool_size is configured explicitly, variables configured based on buffer pool size use the buffer pool size value calculated according to the amount of memory detected on the server rather than the explicitly defined buffer pool size value.
Automatically configured settings are evaluated and reconfigured if necessary each time the MySQL server is started.