Skip to content

Conversation

@mronstro
Copy link

@mronstro mronstro commented May 8, 2023

When initialising REDO log files at startup we want to ensure that the entire file size is preallocated and that the file is properly initialised.

The same is true for UNDO log files in LGMAN and tablespace files.

To speed up this we use special XFS methods and POSIX methods that apply to the file systems we recommend users to use. This means that we can preallocate file space without actually writing it and we can even ensure that reads of this area returns pages filled with zeroes.

We can also use fallocate which works for XFS and ext4 at least in Linux.

We still need to write the initial parts of the file and for the REDO log we have to write each start page of each MByte.

Encrypted and compressed files have a file header that should not be zeroed. More debug info.

When initialising REDO log files at startup we want to ensure that the
entire file size is preallocated and that the file is properly initialised.

The same is true for UNDO log files in LGMAN and tablespace files.

To speed up this we use special XFS methods and POSIX methods that apply
to the file systems we recommend users to use. This means that we can
preallocate file space without actually writing it and we can even ensure
that reads of this area returns pages filled with zeroes.

We can also use fallocate which works for XFS and ext4 at least in Linux.

We still need to write the initial parts of the file and for the REDO log
we have to write each start page of each MByte.

Encrypted and compressed files have a file header that should not
be zeroed. More debug info.
@mysql-oca-bot
Copy link

Hi, thank you for your contribution. Please confirm this code is submitted under the terms of the OCA (Oracle's Contribution Agreement) you have previously signed by cutting and pasting the following text as a comment:
"I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it."
Thanks

@mronstro
Copy link
Author

mronstro commented May 8, 2023 via email

@mysql-oca-bot
Copy link

Hi, thank you for your contribution. Your code has been assigned to an internal queue. Please follow
bug http://bugs.mysql.com/bug.php?id=110951 for updates.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants