mariadb/storage/innobase
Marko Mäkelä 9593cccf28 MDEV-26055: Improve adaptive flushing
Adaptive flushing is enabled by setting innodb_max_dirty_pages_pct_lwm>0
(not default) and innodb_adaptive_flushing=ON (default).
There is also the parameter innodb_adaptive_flushing_lwm
(default: 10 per cent of the log capacity). It should enable some
adaptive flushing even when innodb_max_dirty_pages_pct_lwm=0.
That is not being changed here.

This idea was first presented by Inaam Rana several years ago,
and I discussed it with Jean-François Gagné at FOSDEM 2023.

buf_flush_page_cleaner(): When we are not near the log capacity limit
(neither buf_flush_async_lsn nor buf_flush_sync_lsn are set),
also try to move clean blocks from the buf_pool.LRU list to buf_pool.free
or initiate writes (but not the eviction) of dirty blocks, until
the remaining I/O capacity has been consumed.

buf_flush_LRU_list_batch(): Add the parameter bool evict, to specify
whether dirty least recently used pages (from buf_pool.LRU) should
be evicted immediately after they have been written out. Callers outside
buf_flush_page_cleaner() will pass evict=true, to retain the existing
behaviour.

buf_do_LRU_batch(): Add the parameter bool evict.
Return counts of evicted and flushed pages.

buf_flush_LRU(): Add the parameter bool evict.
Assume that the caller holds buf_pool.mutex and
will invoke buf_dblwr.flush_buffered_writes() afterwards.

buf_flush_list_holding_mutex(): A low-level variant of buf_flush_list()
whose caller must hold buf_pool.mutex and invoke
buf_dblwr.flush_buffered_writes() afterwards.

buf_flush_wait_batch_end_acquiring_mutex(): Remove. It is enough to have
buf_flush_wait_batch_end().

page_cleaner_flush_pages_recommendation(): Avoid some floating-point
arithmetics.

buf_flush_page(), buf_flush_check_neighbor(), buf_flush_check_neighbors(),
buf_flush_try_neighbors(): Rename the parameter "bool lru" to "bool evict".

buf_free_from_unzip_LRU_list_batch(): Remove the parameter.
Only actual page writes will contribute towards the limit.

buf_LRU_free_page(): Evict freed pages of temporary tables.

buf_pool.done_free: Broadcast whenever a block is freed
(and buf_pool.try_LRU_scan is set).

buf_pool_t::io_buf_t::reserve(): Retry indefinitely.
During the test encryption.innochecksum we easily run out of
these buffers for PAGE_COMPRESSED or ENCRYPTED pages.

Tested by Matthias Leich and Axel Schwenke
2023-03-16 17:09:08 +02:00
..
btr MDEV-29835 InnoDB hang on B-tree split or merge 2023-03-16 15:52:42 +02:00
buf MDEV-26055: Improve adaptive flushing 2023-03-16 17:09:08 +02:00
data Merge 10.4 into 10.5 2022-10-25 11:26:37 +03:00
dict MDEV-30638 Deadlock between INSERT and InnoDB non-persistent statistics update 2023-02-16 08:30:20 +02:00
eval
fil Merge 10.5 into 10.6 2023-03-16 15:48:08 +02:00
fsp MDEV-30638 Deadlock between INSERT and InnoDB non-persistent statistics update 2023-02-16 08:30:20 +02:00
fts MDEV-25984 Assertion `max_doc_id > 0' failed in fts_init_doc_id() 2023-02-22 18:54:00 +05:30
fut MDEV-13542: Crashing on corrupted page is unhelpful 2022-06-06 14:03:22 +03:00
gis MDEV-30400 Assertion height == btr_page_get_level(...) on INSERT 2023-01-24 14:09:21 +02:00
ha
handler MDEV-29835 InnoDB hang on B-tree split or merge 2023-03-16 15:52:42 +02:00
ibuf Merge 10.5 into 10.6 2023-03-10 09:35:50 +02:00
include MDEV-26055: Improve adaptive flushing 2023-03-16 17:09:08 +02:00
lock MDEV-30357 Performance regression in locking reads from secondary indexes 2023-03-16 16:00:45 +02:00
log Merge 10.5 into 10.6 2023-02-16 08:17:54 +02:00
mem
mtr MDEV-30638 Deadlock between INSERT and InnoDB non-persistent statistics update 2023-02-16 08:30:20 +02:00
mysql-test/storage_engine
os MDEV-30069 fixup: Do not truncate files on recovery 2022-11-30 12:06:52 +02:00
page Merge branch '10.5' into 10.6 2023-01-31 09:31:42 +01:00
pars MDEV-13542: Crashing on corrupted page is unhelpful 2022-06-06 14:03:22 +03:00
que MDEV-29603 btr_cur_open_at_index_side() is missing some consistency checks 2022-11-17 08:19:01 +02:00
read MDEV-29612 ReadViewBase::snapshot() misses an optimization 2022-10-06 13:14:16 +03:00
rem Merge 10.5 into 10.6 2023-03-10 09:35:50 +02:00
row MDEV-29835 InnoDB hang on B-tree split or merge 2023-03-16 15:52:42 +02:00
srv Merge 10.5 into 10.6 2023-03-16 15:48:08 +02:00
sync Merge 10.4 into 10.5 2022-04-21 15:33:50 +03:00
trx MDEV-30357 Performance regression in locking reads from secondary indexes 2023-03-16 16:00:45 +02:00
unittest
ut Merge 10.5 into 10.6 2022-11-23 18:13:28 +02:00
.clang-format-old
bzip2.cmake
CMakeLists.txt Merge 10.5 into 10.6 2023-02-10 13:03:01 +02:00
COPYING.Google
COPYING.Percona
lz4.cmake
lzma.cmake
lzo.cmake
snappy.cmake