Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-21725

Optimize btr_page_reorganize_low() redo logging

Details

    Description

      MDEV-12353 introduces a purely physical redo log format.

      For btr_page_reorganize_low(), there is no optimization as of now. It is essentially copying the page payload to the redo log, as if all records were inserted anew. A better approach would be to compare the old page contents to the reorganized one, and only emit the minimal amount of WRITE or MEMMOVE records to cover the changes.

      This affects especially the innodb_defragment feature, because it is invoking btr_page_reorganize_low() extensively. The test used to work with the mysql-test/include/default_mysqld.cnf se{{page_delete_rec_list_end()}}tting of innodb_log_buffer_size=1M, but that had to be increased to innodb_log_buffer_size=6M to avoid warnings about the buffer being extended.

      Attachments

        Issue Links

          Activity

            marko Marko Mäkelä created issue -
            marko Marko Mäkelä made changes -
            Field Original Value New Value
            marko Marko Mäkelä made changes -
            Description MDEV-12353 introduces a purely physical redo log format.

            For {{btr_page_reorganize_low()}}, there is no optimization as of now. It is essentially copying the page payload to the redo log, as if all records were inserted anew. A better approach would be to compare the old page contents to the reorganized one, and only emit the minimal amount of {{WRITE}} or {{MEMMOVE}} records to cover the changes.

            This affects especially the {{innodb_defragment}} feature, because it is invoking {{btr_page_reorganize_low()}} extensively.
            MDEV-12353 introduces a purely physical redo log format.

            For {{btr_page_reorganize_low()}}, there is no optimization as of now. It is essentially copying the page payload to the redo log, as if all records were inserted anew. A better approach would be to compare the old page contents to the reorganized one, and only emit the minimal amount of {{WRITE}} or {{MEMMOVE}} records to cover the changes.

            This affects especially the {{innodb_defragment}} feature, because it is invoking {{btr_page_reorganize_low()}} extensively. The test used to work with the {{mysql-test/include/default_mysqld.cnf}} setting of {{innodb_log_buffer_size=1M}}, but that had to be increased to {{innodb_log_buffer_size=6M}} to avoid warnings about the buffer being extended.
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            Description MDEV-12353 introduces a purely physical redo log format.

            For {{btr_page_reorganize_low()}}, there is no optimization as of now. It is essentially copying the page payload to the redo log, as if all records were inserted anew. A better approach would be to compare the old page contents to the reorganized one, and only emit the minimal amount of {{WRITE}} or {{MEMMOVE}} records to cover the changes.

            This affects especially the {{innodb_defragment}} feature, because it is invoking {{btr_page_reorganize_low()}} extensively. The test used to work with the {{mysql-test/include/default_mysqld.cnf}} setting of {{innodb_log_buffer_size=1M}}, but that had to be increased to {{innodb_log_buffer_size=6M}} to avoid warnings about the buffer being extended.
            MDEV-12353 introduces a purely physical redo log format.

            For {{btr_page_reorganize_low()}}, there is no optimization as of now. It is essentially copying the page payload to the redo log, as if all records were inserted anew. A better approach would be to compare the old page contents to the reorganized one, and only emit the minimal amount of {{WRITE}} or {{MEMMOVE}} records to cover the changes.

            This affects especially the {{innodb_defragment}} feature, because it is invoking {{btr_page_reorganize_low()}} extensively. The test used to work with the {{mysql-test/include/default_mysqld.cnf}} se{{page_delete_rec_list_end()}}tting of {{innodb_log_buffer_size=1M}}, but that had to be increased to {{innodb_log_buffer_size=6M}} to avoid warnings about the buffer being extended.
            marko Marko Mäkelä made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            marko Marko Mäkelä made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 103930 ] MariaDB v4 [ 143629 ]

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.