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

CPU performance issue on MariaDB 10.6.5 and later

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.6.17, 10.11.7
    • 11.5.2
    • Server
    • None
    • Os release: Debian 12 "Bookworm"
      Kernel: 6.1.0-17-amd64
      Hardware CPU: Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
      Memory: 128G
      mariadb-server: 1:10.11.6+maria~deb12

    Description

      We are facing serious CPU performance issue (on system usage) after upgrading our database from 10.4 to 10.11.

      While not 100% sure, we identified that the issue appeared on release 10.6.5 (10.6.4 seems not affected).

      How to reproduce:
      Create a database named "neutron":

      $ mysql -e 'create database neutron'
      

      Inject the values from the two attached sql files:

      $ mysql neutron < networkrbacs2.sql
      $ mysql neutron < subnets2.sql
      

      Execute 150 requests in parallel:

      for i in $(seq 1 3); do for j in $(seq 1 50); do (cat get_subnet3 | mysql 2>&1> /dev/null ) &  done; sleep 0.5; done
      

      Take a look at your CPU system usage (it's very high).

      Here is a perf.data file that we captured during the requests:

      https://plik.ovh/file/UMgOCcPerrToULdK/mnc0kBKJocKmeyTK/perf.data

      You will see using:

      perf report -i perf.data
      

      that it's mostly wasting system CPU in native_queued_spin_lock_slowpath

      Attachments

        1. get_subnet3
          0.4 kB
        2. networkrbacs2.sql
          52 kB
        3. subnets2.sql
          980 kB
        4. cpu_system_load.png
          cpu_system_load.png
          81 kB
        5. MDEV-33920.7z
          2.18 MB
        6. arnaud-ubuntu2404.svg
          254 kB

        Activity

          People

            Unassigned Unassigned
            arnaudmorin Arnaud Morin
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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