mariadb/storage/innobase
Marko Mäkelä a635c40648 MDEV-27774 Reduce scalability bottlenecks in mtr_t::commit()
A prominent bottleneck in mtr_t::commit() is log_sys.mutex between
log_sys.append_prepare() and log_close().

User-visible change: The minimum innodb_log_file_size will be
increased from 1MiB to 4MiB so that some conditions can be
trivially satisfied.

log_sys.latch (log_latch): Replaces log_sys.mutex and
log_sys.flush_order_mutex. Copying mtr_t::m_log to
log_sys.buf is protected by a shared log_sys.latch.
Writes from log_sys.buf to the file system will be protected
by an exclusive log_sys.latch.

log_sys.lsn_lock: Protects the allocation of log buffer
in log_sys.append_prepare().

sspin_lock: A simple spin lock, for log_sys.lsn_lock.

Thanks to Vladislav Vaintroub for suggesting this idea, and for
reviewing these changes.

mariadb-backup: Replace some use of log_sys.mutex with recv_sys.mutex.

buf_pool_t::insert_into_flush_list(): Implement sorting of flush_list
because ordering is otherwise no longer guaranteed. Ordering by LSN
is needed for the proper operation of redo log checkpoints.

log_sys.append_prepare(): Advance log_sys.lsn and log_sys.buf_free by
the length, and return the old values. Also increment write_to_buf,
which was previously done in log_close().

mtr_t::finish_write(): Obtain the buffer pointer from
log_sys.append_prepare().

log_sys.buf_free: Make the field Atomic_relaxed,
to simplify log_flush_margin(). Use only loads and stores
to avoid costly read-modify-write atomic operations.

buf_pool.flush_list_requests: Replaces
export_vars.innodb_buffer_pool_write_requests
and srv_stats.buf_pool_write_requests.
Protected by buf_pool.flush_list_mutex.

buf_pool_t::insert_into_flush_list(): Do not invoke page_cleaner_wakeup().
Let the caller do that after a batch of calls.

recv_recover_page(): Invoke a minimal part of
buf_pool.insert_into_flush_list().

ReleaseBlocks::modified: A number of pages added to buf_pool.flush_list.

ReleaseBlocks::operator(): Merge buf_flush_note_modification() here.

log_t::set_capacity(): Renamed from log_set_capacity().
2022-02-10 16:37:12 +02:00
..
btr MDEV-26938 Support descending indexes internally in InnoDB 2022-01-26 18:43:05 +01:00
buf MDEV-27774 Reduce scalability bottlenecks in mtr_t::commit() 2022-02-10 16:37:12 +02:00
data MDEV-26938 Support descending indexes internally in InnoDB 2022-01-26 18:43:05 +01:00
dict Merge branch '10.7' into 10.8 2022-02-04 14:50:25 +01:00
eval MDEV-26938 Support descending indexes internally in InnoDB 2022-01-26 18:43:05 +01:00
fil MDEV-27774 Reduce scalability bottlenecks in mtr_t::commit() 2022-02-10 16:37:12 +02:00
fsp MDEV-14425 Improve the redo log for concurrency 2022-01-21 16:03:47 +02:00
fts Merge branch '10.7' into 10.8 2022-02-04 14:50:25 +01:00
fut MDEV-27058: Reduce the size of buf_block_t and buf_page_t 2021-11-18 17:47:19 +02:00
gis Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
ha MDEV-22871: Remove pointer indirection for InnoDB hash_table_t 2020-06-18 14:16:01 +03:00
handler MDEV-27774 Reduce scalability bottlenecks in mtr_t::commit() 2022-02-10 16:37:12 +02:00
ibuf MDEV-26938 Support descending indexes internally in InnoDB 2022-01-26 18:43:05 +01:00
include MDEV-27774 Reduce scalability bottlenecks in mtr_t::commit() 2022-02-10 16:37:12 +02:00
lock MDEV-27025 insert-intention lock conflicts with waiting ORDINARY lock 2022-01-18 18:15:10 +03:00
log MDEV-27774 Reduce scalability bottlenecks in mtr_t::commit() 2022-02-10 16:37:12 +02:00
mem MDEV-27058: Reduce the size of buf_block_t and buf_page_t 2021-11-18 17:47:19 +02:00
mtr MDEV-27774 Reduce scalability bottlenecks in mtr_t::commit() 2022-02-10 16:37:12 +02:00
mysql-test/storage_engine
os MDEV-27790: Fix mis-matched braces for non-Linux targets 2022-02-10 17:18:37 +11:00
page MDEV-26938 Support descending indexes internally in InnoDB 2022-01-26 18:43:05 +01:00
pars MDEV-26938 Support descending indexes internally in InnoDB 2022-01-26 18:43:05 +01:00
que MDEV-25919 preparation: Various cleanup 2021-08-31 13:54:20 +03:00
read Merge branch '10.3' into 10.4 2021-07-31 22:59:58 +02:00
rem Merge branch '10.7' into 10.8 2022-02-04 14:50:25 +01:00
row Merge branch '10.7' into 10.8 2022-02-04 14:50:25 +01:00
srv MDEV-27774 Reduce scalability bottlenecks in mtr_t::commit() 2022-02-10 16:37:12 +02:00
sync MDEV-27774 Reduce scalability bottlenecks in mtr_t::commit() 2022-02-10 16:37:12 +02:00
trx MDEV-14425 Improve the redo log for concurrency 2022-01-21 16:03:47 +02:00
unittest Merge 10.5 into 10.6 2021-10-21 16:06:34 +03:00
ut MDEV-27158: humanize the bytes in innodb info/error messages 2022-01-18 14:20:59 +02:00
.clang-format-old switch off storage/innobase/.clang-format: InnoDB uses a common formatting style for all new code 2021-03-17 11:01:15 +03:00
CMakeLists.txt Merge branch '10.7' into 10.8 2022-02-04 14:50:25 +01:00
COPYING.Google
COPYING.Percona
innodb.cmake MDEV-12933 sort out the compression library chaos 2021-10-27 15:55:14 +02:00
plugin_exports