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

THD::enter_stage() takes 0.48% in OLTP RO

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.1
    • 10.1.5
    • OTHER
    • None

    Description

      Data comes from Sandy Bridge system running sysbench OLTP RO in 1 thread against 1 table.

      Call graphs:

      -   0.48%  mysqld  mysqld
         - THD::enter_stage(PSI_stage_info_v1 const*, PSI_stage_info_v1*, char const*, char const*, unsigned int)
            + 17.64% JOIN::optimize_inner()
            + 10.74% JOIN::exec_inner()
            + 7.88% mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_
            + 7.39% open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*)
            + 7.30% mysql_lock_tables(THD*, st_mysql_lock*, unsigned int)
            + 5.98% net_after_header_psi(st_net*, void*, unsigned long, char)
            + 5.79% check_access(THD*, unsigned long, char const*, unsigned long*, st_grant_internal_info*, bool, bool)
            + 4.57% JOIN::optimize()
            + 4.22% close_thread_tables(THD*)
            + 4.18% set_thd_proc_info
            + 3.85% mysql_execute_command(THD*)
            + 3.83% JOIN::exec()
            + 3.77% mysql_parse(THD*, char*, unsigned int, Parser_state*)
            + 3.30% dispatch_command(enum_server_command, THD*, char*, unsigned int)
            + 3.09% mysql_unlock_tables(THD*, st_mysql_lock*, bool)
            + 2.77% check_table_access(THD*, unsigned long, TABLE_LIST*, bool, unsigned int, bool)
            + 1.49% my_real_read(st_net*, unsigned long*, char)
            + 0.72% mysql_lock_tables(THD*, TABLE**, unsigned int, unsigned int)

      Most of the time is spent calling profiling.status_change(). This may be caused by branch misprediction. Aim of this task is to try to get rid of these branches. Inlining progiling.status_change() will be subject of different task.

      Attachments

        Issue Links

          Activity

            People

              svoj Sergey Vojtovich
              svoj Sergey Vojtovich
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.