innodb_flush_log_at_trx_commit=1
The default value of 1 is required for full ACID compliance. The contents of the InnoDB
log buffer are written out to the log file at each transaction commit and the log file is flushed to disk.
0 = log buffer are written to the log file approximately once per second and the log file is flushed to disk
2 = log buffer are written to the log file after transaction commit and the log file is flushed to disk approximately once per second
logbuffer-->logfiles[ib_logfileN] --> redolog [ib_logfile0 , ib_logfile1] size limit is 512G (default-48M)
log buffer
The memory area that holds data to be written to the log files that make up the redo log. It is controlled by the innodb_log_buffer_size configuration option.
redo log
A disk-based data structure used during crash recovery, to correct data written by incomplete transactions. During normal operation, it encodes requests to change InnoDB table data, which result from SQL statements or low-level API calls through NoSQL interfaces. Modifications that did not finish updating the data files before an unexpected shutdown are replayed automatically.
The redo log is physically represented as a set of files, typically named ib_logfile0 and ib_logfile1. The data in the redo log is encoded in terms of records affected; this data is collectively referred to as redo. The passage of data through the redo logs is represented by the ever-increasing LSN value. The original 4GB limit on maximum size for the redo log is raised to 512GB in MySQL 5.6.3.
The disk layout of the redo log is influenced by the configuration options innodb_log_file_size, innodb_log_group_home_dir, and (rarely)innodb_log_files_in_group. The performance of redo log operations is also affected by the log buffer, which is controlled by the innodb_log_buffer_size configuration option.
No comments:
Post a Comment