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

Performance regression from new CPU overhead in btr_pcur_t::restore_position

    XMLWordPrintable

Details

    Description

      I ran sysbench with 1 client, 1 table and 50M rows (cached) to compare 10.11.16 and 11.4.10. I used latin1 charset for both.

      Performance is mostly the same for point and range queries.
      There are some regressions, up to 9%, for writes.

      From flamegraphs in comments below the problem appears to be new CPU overhead in btr_pcur_t::restore_position. That went from 0.27% of samples in 10.11.16 to 6.14% of samples in 11.4.10.

      I reproduced this twice and don't think it is noise. I assume it can be reproduced via this script. The my.cnf files that I used are here for 10.11.16 and for 11.4.10. The command line for the update-inlist test is here but I don't know if it reproduces standalone – I always run the full sequence of tests.

      The numbers below are "relative QPS" which is: (QPS with 11.4.10 / QPS with 10.11.16).

      For writes there are some regressions and update-inlist is the worst case where throughput (QPS) drops by 9%.

      writes
      0.95    delete_range=100
      1.00    insert_range=100
      0.99    read-write_range=100
      0.98    read-write_range=10
      0.97    update-index_range=100
      0.91    update-inlist_range=100
      0.93    update-nonindex_range=100
      0.94    update-one_range=100
      0.93    update-zipf_range=100
      0.95    write-only_range=10000
      

      And results for point and range queries looks OK

       
      point queries
      1.01    hot-points_range=100
      0.99    point-query_range=100
      1.01    points-covered-pk_range=100
      1.01    points-covered-si_range=100
      1.01    points-notcovered-pk_range=100
      1.01    points-notcovered-si_range=100
      1.01    random-points_range=1000
      1.01    random-points_range=100
      1.02    random-points_range=10
       
      range queries without aggregation
      1.03    range-covered-pk_range=100
      1.02    range-covered-si_range=100
      1.02    range-notcovered-pk_range=100
      1.02    range-notcovered-si_range=100
      0.98    scan_range=100
       
      range queries with aggregation
      1.00    read-only-count_range=1000
      0.99    read-only-distinct_range=1000
      1.00    read-only-order_range=1000
      1.01    read-only_range=10000
      1.00    read-only_range=100
      1.00    read-only_range=10
      1.01    read-only-simple_range=1000
      1.01    read-only-sum_range=1000
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mdcallag Mark Callaghan
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.