Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.5
Description
Workload: sysbench OLTP write-only, i.e. as it is used by the regression benchmark suite in t_writes_innodb_multi.
Setup: 16G buffer pool. 4G redo log. 4G or 8G data set. innodb_flush_neighbors = 0, innodb_io_capacity = 1000 (or 5000, 10000)
Observation: after starting high, performance drops after ~ 1 minute. If waiting long enough, one can see oscillations in throughput. This seems to be related to Innodb_checkpoint_age reaching Innodb_checkpoint_max_age. There seems to be no LRU flushing at all, only flush_list flushing.
Attachments
Issue Links
- blocks
-
MDEV-11659 Move the InnoDB doublewrite buffer to flat files
-
- Open
-
-
MDEV-23756 Implement event-driven innodb_adaptive_flushing=OFF that ignores innodb_io_capacity
-
- Open
-
-
MDEV-24000 Reduce fil_system.mutex contention
-
- Closed
-
- causes
-
MDEV-24049 InnoDB: Failing assertion: node->is_open() in fil_space_t::flush_low
-
- Closed
-
-
MDEV-24053 MSAN use-of-uninitialized-value in tpool::simulated_aio::simulated_aio_callback()
-
- Closed
-
-
MDEV-24101 innodb_random_read_ahead=ON causes hang on DDL or shutdown
-
- Closed
-
-
MDEV-24109 InnoDB hangs with innodb_flush_sync=OFF
-
- Closed
-
-
MDEV-24190 Accessing INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION may break innodb_open_files logic
-
- Closed
-
-
MDEV-24313 Hang with innodb_use_native_aio=0 and innodb_write_io_threads=1
-
- Closed
-
-
MDEV-24348 InnoDB shutdown hang with innodb_flush_sync=0
-
- Closed
-
-
MDEV-24391 heap-use-after-free in fil_space_t::flush_low()
-
- Closed
-
-
MDEV-24442 Assertion `space->referenced()' failed in fil_crypt_space_needs_rotation
-
- Closed
-
-
MDEV-24537 innodb_max_dirty_pages_pct_lwm=0 lost its special meaning
-
- Closed
-
-
MDEV-25093 Adaptive flushing fails to kick in even if innodb_adaptive_flushing_lwm is hit. (possible regression)
-
- Closed
-
-
MDEV-25110 [ERROR] [FATAL] InnoDB: Trying to write 16384 bytes at 1032192 outside the bounds
-
- Closed
-
-
MDEV-25214 Server crash in fil_space_t::try_to_close or Assertion `!node->is_open()' failed in fil_node_open_file_low
-
- Closed
-
-
MDEV-25215 Excessive logging "Cannot close file ./test/FTS_xxx.ibd because of n pending operations and pending fsync
-
- Closed
-
-
MDEV-25613 mariabackup.absolute_ibdata_paths caused signal 6 (assertion failure)
-
- Closed
-
-
MDEV-25948 Remove log_flush_task
-
- Closed
-
-
MDEV-26293 InnoDB: Failing assertion: space->is_ready_to_close() || space->purpose == FIL_TYPE_TEMPORARY || srv_fast_shutdown == 2 || !srv_was_started
-
- Closed
-
-
MDEV-30227 [ERROR] [FATAL] InnoDB: fdatasync() returned 9
-
- Closed
-
-
MDEV-30860 Race condition between buffer pool flush and log file deletion in mariadb-backup --prepare
-
- Closed
-
-
MDEV-31124 Innodb_data_written miscounts doublewrites
-
- Closed
-
-
MDEV-31347 fil_ibd_create() may hijack the file handle of an old file
-
- Closed
-
-
MDEV-32150 InnoDB reports corruption on 32-bit platforms with ibd files sizes > 4GB
-
- Closed
-
- is blocked by
-
MDEV-23986 [ERROR] [FATAL] InnoDB: Page ... name ... page_type ... key_version 1 lsn ... compressed_len ...
-
- Closed
-
-
MDEV-24012 Assertion `cursor->is_system() || srv_operation == SRV_OPERATION_RESTORE_DELTA || xb_close_files' failed.
-
- Closed
-
- relates to
-
MDEV-11384 AliSQL: [Feature] Issue#19 BUFFER POOL LIST SCAN OPTIMIZATION
-
- Closed
-
-
MDEV-15949 InnoDB: Failing assertion: space->n_pending_ops == 0 in fil_delete_tablespace upon DROP TABLE
-
- Closed
-
-
MDEV-20648 InnoDB: Failing assertion: !(*node)->being_extended, innodb.log_data_file_size failed in buildbot, assertion `!space->is_stopping()'
-
- Closed
-
-
MDEV-24350 buf_dblwr unnecessarily uses memory-intensive srv_stats counters
-
- Closed
-
-
MDEV-24661 The test innodb.innodb_wl6326_big often times out
-
- Closed
-
-
MDEV-24854 Change innodb_flush_method=O_DIRECT by default
-
- Closed
-
-
MDEV-24949 Enabling idle flushing (possible regression from MDEV-23855)
-
- Closed
-
-
MDEV-25425 Useless message "If the mysqld execution user is authorized page cleaner thread priority can be changed."
-
- Closed
-
-
MDEV-26855 Enable spinning for log_sys_mutex and log_flush_order_mutex
-
- Closed
-
-
MDEV-33770 Alter operation hangs when encryption thread works on the same tablespace
-
- Closed
-
-
MDEV-14462 Confusing error message: ib_logfiles are too small for innodb_thread_concurrency=0
-
- Closed
-
-
MDEV-15752 Possible race between DDL and accessing I_S.INNODB_TABLESPACES_ENCRYPTION
-
- Confirmed
-
-
MDEV-23399 10.5 performance regression with IO-bound tpcc
-
- Closed
-
-
MDEV-23929 innodb_flush_neighbors is not being ignored for system tablespace on SSD
-
- Closed
-
-
MDEV-25003 mtflush_service_io - workitem status is always SUCCESS even if pool flush fails
-
- Closed
-
-
MDEV-27295 MariaDB 10.5 does not do idle checkpoint (regression). Marked as fixed on 10.5.13 but it is not
-
- Closed
-
With
MDEV-24537fixed (in 10.5.9), the default value innodb_max_dirty_pages_pct_lwm=0 will retain its previously undocumented meaning: innodb_max_dirty_pages_pct (a similarly-named parameter without the _lwm suffix) will be consulted instead. To have other versions behave like MariaDB 10.5.7 and 10.5.8 with regard to this parameter, I believe that the following should work:It is obvious that having the page cleaner thread perform eager ‘pre-flushing’ will reduce the age of the log checkpoint, and thus will reduce the likelihood that user threads will have to wait for a checkpoint flushing batch to successfully reduce the age of the checkpoint.
As part of this task, the page cleaner was almost rewritten, and many CPU contention points were removed. The contention on fil_system.mutex was reduced, and the doublewrite buffer initiates asynchronous writes, instead of synchronous ones. Thanks to these changes, the maximum latency (even in the case that the ‘pre-flushing’ is disabled) should be lower. In
MDEV-24537I posted the result of a quick test on a hard disk.One more thing worth noting is that the parameter innodb_io_capacity is not only the target number of pages per second to write during the ‘background pre-flushing’ (when it is enabled by innodb_max_dirty_pages_pct_lwm and other parameters), but also the number of pages to write per batch during the furious checkpoint flushing (enabled by default by innodb_flush_sync=ON).
My intuition says that a DBA who wants to minimize ‘write amplification’ should try to disable the pre-flushing altogether (so that repeatedly modified pages will be rewritten to data files less frequently). In that kind of a scenario, I would expect that setting innodb_io_capacity to a small value will reduce the wait times in buf_flush_wait_flushed().
I think that we will need more benchmarking for this. One parameter that I do not think we have not measured is ‘average number of page writes per transaction’. I think that we should try to minimize that while simultaneously trying to keep the throughput and latency as stable as possible. Possibly, the function buf_flush_sync_for_checkpoint() will need a separate parameter for the number of pages written per batch, instead of reusing innodb_io_capacity. (After all, that function is executing in I/O bound mode, potentially writing many more than innodb_io_capacity pages per second.)