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

Improving performance of 'row_mysql_store_col_in_innobase_format'

    XMLWordPrintable

Details

    Description

      Continuing the research made in MDEV-22720,
      we found another opportunity to slightly increase performance of InnoDB.

      `storage/innobase/row/row_mysql_store_col_in_innobase_format` function
      chops spaces inefficiently, we already have the `skip_trailing_space`
      function in include/m_string.h which does it faster. It makes sense for
      fixed fields with UTF8 charset (see comments in the source).

      Since the function is not too hot, to prove the profit we used sysbench
      OLTP_UPDATE_NON_INDEX test and managed to see +2.5% improvement in 4 threads.

      Our platform: Kunpeng 920 aarch64 CPU (64 cores), Ubuntu 20.04, gcc-9.3.0

      Suggested fix
      Use skip_trailing_spaces in the row_mysql_store_col_in_innobase_format function
      when dealing with 0x20 spaces:

      col_len = skip_trailing_space(ptr + n_chars, col_len - n_chars) - ptr;
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              dmitriy.philimonov Dmitriy Philimonov
              Votes:
              0 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.