WL#10310: Redo log optimization: dedicated threads and concurrent log buffer
Affects: Server-8.0 — Status: Complete — Priority: Medium
Optimize redo log - eliminate contention on log_sys/write mutexes.
1. User threads should be able to write concurrently to log buffer. They should not need to synchronize with each other while writing. 2. User threads should be able to add dirty pages to flush list without synchronization required for total order by LSN. 3. Dedicated log thread should: * write log buffer to system buffers (log_writer), * flush system buffers to disk (log_flusher), * notify user threads about written redo (log_write_notifier), * notify user threads about flushed redo (log_flush_notifier), * write checkpoints (log_checkpointer), * and maintain the lag available for relaxed order in flush lists (log_closer). 4. The following exposed system variables, can be changed in runtime now: * innodb_log_buffer_size * innodb_log_write_ahead_size 5. New exposed system variables: * innodb_log_wait_for_flush_spin_hwm: "Maximum value of average log flush time for which spin-delay is used. When flushing takes longer, user threads no longer spin when waiting for flushed redo. Expressed in microseconds." * innodb_log_spin_cpu_abs_lwm: "Minimum value of cpu time for which spin-delay is used. Expressed in percentage of single cpu core." * innodb_log_spin_cpu_pct_hwm: "Maximum value of cpu time for which spin-delay is used. Expressed in percentage of all cpu cores." There is also a list of hidden new system variables, which are not accessible for users, unless user defined ENABLE_EXPERIMENT_SYSVARS=1 when configuring cmake. We skip listing them here.
Copyright (c) 2000, 2019, Oracle Corporation and/or its affiliates. All rights reserved.