maria:bb-10.8-MDEV-14425-flush_order_mutex

Last commit made on 2022-01-11
Get this branch:
git clone -b bb-10.8-MDEV-14425-flush_order_mutex https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.8-MDEV-14425-flush_order_mutex
Repository:
lp:maria

Recent commits

d0948c8... by Marko Mäkelä

Test: Merge buf_pool.flush_order_mutex to log_sys.mutex

This will actually reduce throughput by increasing contention
on log_sys.mutex.

c188412... by Marko Mäkelä

Correct Innodb_log_write_requests

log_close(): Update log_sys.write_to_buf.

mtr_t::commit(): Remove the conditional update of log_sys.write_to_buf.
We do write to the log even if we are not marking pages modified for
the first time.

mtr_t::commit_shrink(): Let log_close() in mtr_t::finish_write() update
log_sys.write_to_buf.

3135e5e... by Marko Mäkelä

On Linux, only enable O_DIRECT on the log for innodb_flush_method=O_DSYNC

A quick test with the log on a PCIe NVMe drive yields the best
throughput without O_DIRECT. With O_DIRECT|O_DSYNC
(enabled by innodb_flush_method=O_DSYNC) both the average and
the maximum throughput are a little faster.

The slowest would be O_DIRECT without O_DSYNC.
Hence, it probably is better to not use O_DIRECT on the log file
when not also setting O_DSYNC.

23bce2e... by Marko Mäkelä

squash! f7834884d3c31163cdc722065b8f998adb1844cd Proper fix

mtr_t::finish_write(): Avoid invoking
log_sys.set_check_flush_or_checkpoint() if log_sys.is_pmem().
The log_sys.max_buf_free has no meaning on the mmap-based log.

With this, the mmap-based log writes are finally faster than the
pwrite() and fdatasync() based writes.

81cf92e... by Marko Mäkelä

Performance: Use pmem_persist() instead of pmem_deep_persist()

One PMEM device would deliver about 800 transaction commits per second
with pmem_deep_persist() and about 127,000 commits per second with
pmem_persist().

We will basically assume that the PMEM device does not lose writes
on power loss, just like the previous interface
pmem_memcpy_persist() did.

f783488... by Marko Mäkelä

mtr_t::finish_write(): Add a futile optimization attempt

dbb8f6f... by Marko Mäkelä

squash! 5dda68150bca33c0678422e6660bc17687337dcb Use flush_lock also on PMEM

Invoking pmem_deep_persist() turns out to make things very slow
on PMEM. It is better to always use flush_lock for group commit.

1bf129a... by Marko Mäkelä

fixup! 5dda68150bca33c0678422e6660bc17687337dcb

Actually use group commit in trx_flush_log_if_needed_low()

a95a288... by Marko Mäkelä

Call write_lock.set_pending() earlier

121bf15... by Marko Mäkelä

Call pmem_deep_persist() even on /dev/shm

The calls do not seem to incur too much overhead after all.
Let us invoke pmem_deep_persist() also when running on /dev/shm
so that we can get more realistic estimates on actual PMEM performance.

log_t::create(): Also set flushed_to_disk_lsn, to avoid an
assertion failure in persist().