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

Suboptimal performance of crc32_avx512()

    XMLWordPrintable

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 10.5(EOL), 10.6, 10.11, 11.4, 11.8, 12.3
    • 10.11, 11.4, 11.8, 12.3
    • IA-32 or AMD64 with pclmul, avx512f, avx512dq, avx512bw, avx512vl, vpclmulqdq (x86-64-v3)

    Description

      While working on MDEV-37482 back in September 2025, I noticed that https://github.com/corsix/fast-crc32 performs significantly faster than our C++ port of some assembler code developed by Intel engineers (MDEV-33817). On an AMD Zen 5 based laptop, I observed an improvement of 40% in a microbenchmark.

      The actual improvement for InnoDB workloads is expected to be significantly less, and it may vary depending on the workload and the CPU microarchitecture.

      This needs some research. Some of the missed optimizations are applicable to the CRC-32C only, making use of the instruction that had been added SSE 4.2, debuting in the Intel Nehalem microarchitecture. That instruction is not applicable to the ISO 3309 and zlib polynomial, which we predominantly use outside ENGINE=InnoDB and ENGINE=RocksDB.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Marko Mäkelä Marko Mäkelä
              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.