ACID and IO overload both parameters

ACID-assured data

1.sync_binlog = 1 (binary security)

  Number prior to ensure transaction commit, binary log from the log buffer to disk flush operating binary log commit group, and 0 indicates alone own refresh mechanism to refresh the system from the system buffer to disk (depending on where the system mysql example IO buffer refresh mechanism), 1 represents a transaction commit before the corresponding binary logs to disk refreshed, greater than 1 indicates a plurality of binary log commit work Group disposable brush plate, 0 and values ​​greater than 1 binary log records have lost risk.

2.innodb_flush_log_at_trx_commit = 1 (redo log security)

  innodb_flush_log_at_trx_commit for InnoDB log buffer to disk log file enforcement mechanisms landing, 1 indicates strict compliance with ACID, once the transaction commit, InnoDB logs will be flushed to disk. 0 is to rely on the system's own mechanisms from the buffer to the disk to ensure the floor, two log file buffer will fall once every N seconds, depending innodb_flush_log_at_timeout parameter N, 0 and 2 are Ben collapse at the server or system there is the risk of loss of logging.

3.innodb_doublewrite = 1 (data security)

  innodb_doublewrite is a safety mechanism to save disk when a data file saved, mainly to avoid due to the different InnoDB page size and OS block size, probably during the I / O operation time, partial page write due to various problems caused by the collapse of Ben.

IO upgrade method

Log files and data files 1.InnoDB engine directory layout above are distributed in different physical disks above

2. Improve innodb buffer size, innodb_buffer_pool_size

3. Use delay_key_write = ON option, do batch index updates. Valid only for engine myisam

Guess you like

Origin www.cnblogs.com/kuafu1104/p/11401899.html