content_image/812511.jpg content_image/812519.jpg
<img src='content_image/812511.jpg'>

Defines the method used to flush data to InnoDB  data files and log files, which can affect I/O throughput. 

On Unix-like systems, the default value is fsync . On Windows, the default value is unbuffered . 

<img src='content_image/812519.jpg'>

The innodb_flush_method  options for Unix-like systems include: 

## Note 

In MySQL 8.0, innodb_flush_method  options may be specified numerically. 

• fsync  or 0 : InnoDB  uses the fsync()  system call to flush both the data and log files. fsync  is the default setting. 

• O_DSYNC  or 1 : InnoDB  uses O_SYNC  to open and flush the log files, and fsync()  to flush the data files. InnoDB  does not use O_DSYNC  directly because there have been problems with it on many varieties of Unix. 

• littlesync  or 2 : This option is used for internal performance testing and is currently unsupported. Use at your own risk. 

• nosync  or 3 : This option is used for internal performance testing and is currently unsupported. Use at your own risk. 

• O_DIRECT  or 4 : InnoDB  uses O_DIRECT  (or directio()  on Solaris) to open the data files, and uses fsync()  to flush both the data and log files. This option is available on some GNU/Linux versions, FreeBSD, and Solaris. 

• O_DIRECT_NO_FSYNC : InnoDB  uses O_DIRECT  during flushing I/O, but skips the fsync()  system call after each write operation. 

Prior to MySQL 8.0.14, this setting is not suitable for file systems such as XFS and EXT4, which require an fsync()  system call to synchronize file system metadata changes. If you are not sure 

