[MDEV-18115] Remove dummy tablespace for the redo log Created: 2018-12-31  Updated: 2023-05-02  Resolved: 2020-01-01

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Fix Version/s: 10.5.1

Type: Task Priority: Critical
Reporter: Marko Mäkelä Assignee: Eugene Kosov (Inactive)
Resolution: Fixed Votes: 0
Labels: performance

Attachments: File remove_log_tablespace.patch    
Issue Links:
Blocks
blocks MDEV-14425 Change the InnoDB redo log format to ... Closed
blocks MDEV-16526 Overhaul the InnoDB page flushing Closed
blocks MDEV-21382 use fdatasync() for redo log where ap... Closed
Relates
relates to MDEV-13542 Crashing on a corrupted page is unhel... Closed
relates to MDEV-31170 Document MDEV-18115, Remove dummy tab... Open
relates to MDEV-26603 asynchronous redo log write Stalled
relates to MDEV-31124 Innodb_data_written miscounts doublew... Closed

 Description   

In InnoDB, redo log file operations unnecessarily go through the fil_io() API. It would be cleaner to just have the log file descriptors straight inside log_sys.log.

Most redo log writes are synchronous. The only exception is writing the checkpoint header block, which uses asynchronous I/O. It might be better to dedicate the io_handler_thread() for data file operations only, and not let them deal with the redo log checkpoint write completion.



 Comments   
Comment by Marko Mäkelä [ 2018-12-31 ]

The attached remove_log_tablespace.patch is a starting point. Some stubs will have to be written, and log_sys.log must store the redo log file handle(s).

As far as I understand, moving the redo log out of fil_io() should reduce some contention on fil_system.mutex.

Comment by Eugene Kosov (Inactive) [ 2019-12-10 ]

Note for myself: open a ticket for improving redo log error handling. We barely can do something about `write()` and `fsync()` errors but `read()` could be handled somehow without crashing.

Comment by Marko Mäkelä [ 2019-12-17 ]

For improving read() handling there already exists MDEV-13542.

Comment by Marko Mäkelä [ 2019-12-23 ]

Nice work!

Comment by Marko Mäkelä [ 2023-04-25 ]

Starting with this change, the counter Innodb_data_written no longer counts writes to the InnoDB redo log file ib_logfile0. Those writes continue to be part of Innodb_os_log_written.

Generated at Thu Feb 08 08:41:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.