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

sql_alloc() takes 0.25% 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.25%  mysqld  mysqld
         - sql_alloc(unsigned long)
            + 15.99% lex_start(THD*)
            + 8.75% JOIN::optimize_inner()
            + 7.15% st_select_lex::init_query()
            + 5.04% String_list::append_str(st_mem_root*, char const*)
            + 4.94% mysql_execute_command(THD*)
            + 4.85% execute_sqlcom_select(THD*, TABLE_LIST*)
            + 4.47% MYSQLparse(THD*)
            + 3.65% make_join_statistics(JOIN*, List<TABLE_LIST>&, st_dynamic_array*)
            + 3.35% check_simple_equality(Item*, Item*, Item*, COND_EQUAL*)
            + 2.85% Item_equal::add_const(Item*, Item*)
            + 2.64% get_best_combination(JOIN*)
            + 2.64% build_equal_items_for_cond(THD*, Item*, COND_EQUAL*, bool)
            + 2.49% setup_tables(THD*, Name_resolution_context*, List<TABLE_LIST>*, TABLE_LIST*, List<TABLE_LIST>&, bool, bool)
            + 2.48% append_possible_keys(st_mem_root*, String_list&, TABLE*, Bitmap<64u>)
            + 2.18% make_select(TABLE*, unsigned long long, unsigned long long, Item*, bool, int*)
            + 2.17% Item_equal::update_const()
            + 1.79% st_select_lex::add_joined_table(TABLE_LIST*)
            + 1.58% Item_equal::Item_equal(Item*, Item*, bool)
            + 1.58% Explain_index_use::set(st_mem_root*, st_key*, unsigned int)
            + 1.39% Eq_creator::create(Item*, Item*) const
            + 1.29% make_leaves_list(List<TABLE_LIST>&, TABLE_LIST*, bool, TABLE_LIST*)
            + 1.29% build_equal_items(JOIN*, Item*, COND_EQUAL*, List<TABLE_LIST>*, bool, COND_EQUAL**, bool) [clone .constprop.262]
            + 1.26% handle_select(THD*, LEX*, select_result*, unsigned long)
            + 1.18% 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_â–’
            + 1.08% Item_equal::fix_length_and_dec()
            + 0.99% get_quick_select(PARAM*, unsigned int, SEL_ARG*, unsigned int, unsigned int, st_mem_root*)
            + 0.88% get_quick_keys(PARAM*, QUICK_RANGE_SELECT*, st_key_part*, SEL_ARG*, unsigned char*, unsigned int, unsigned char*, unsigned int)
            + 0.86% st_select_lex::save_leaf_tables(THD*)
            + 0.78% get_func_mm_tree(RANGE_OPT_PARAM*, Item_func*, Field*, Item*, Item_result, bool) [clone .isra.173]
            + 0.69% Item_field::get_tmp_table_item(THD*)
            + 0.67% st_join_table::save_explain_data(Explain_table_access*, unsigned long long, bool, st_join_table*)
            + 0.61% change_to_use_tmp_fields(THD*, Item**, List<Item>&, List<Item>&, unsigned int, List<Item>&)
            + 0.57% st_select_lex::add_item_to_list(THD*, Item*)
            + 0.51% get_mm_parts(RANGE_OPT_PARAM*, Item*, Field*, Item_func::Functype, Item*, Item_result) [clone .isra.162] [clone .part.163]
            + 0.51% Item_cache::get_cache(Item const*, Item_result)

      Another good candidate for inlining. Plus try to get rid of call to my_pthread_getspecific_ptr().

      Attachments

        Issue Links

          Activity

            People

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