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

High CPU usage in open_tables() at high concurrency

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 13.3
    • None

    Description

      During a HammerDB TPROC-C run on 192 physical cores, open_tables() was the largest MariaDB CPU hotspot.

      Overhead Shared Object Symbol
      8.96% mariadbd open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*)
      4.45% mariadbd mtr_t::commit_log_release()
      4.31% mariadbd mtr_t::finish_writer<false>()
      3.15% mariadbd ssux_lock_impl<false>::rd_lock_nospin()
      

      open_tables() consistently consumes approximately 9% of total CPU, making it the largest single hotspot during the workload.

      The attached perf-report.txt confirms the result and shows open_tables() being called through the normal SQL statement preparation path:

      Sql_cmd_dml::prepare()
      -> open_tables_for_query()
      -> open_tables()
      

      Branch tested was bb-12.3-av-perf-3 (12.3.3). As MDEV Optimize open_tables to take O(N) time MDEV-30182 is related the commits were cherry-picked onto bb-12.3-av-perf-3 and confirmed not to bring benefit for this workload.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Steve Shaw Steve Shaw
              Votes:
              0 Vote for this issue
              Watchers:
              7 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.