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

select with large in-list has too much mutex contention

    XMLWordPrintable

Details

    Description

      I assume this is caused by the switch to only one buffer pool instance in 10.5. Although I a curious why it doesn't reproduce in 10.8.8.

      One of the tests I use with sysbench does a SELECT with a large in-list. The query is like this, but with 100 values in the in-list.
      explain SELECT id FROM sbtest1 WHERE id IN ( 3070137, 1300250, ...);

      Edit - I need to update when this arrives. The problem first arrives in 10.5, is still in 10.6 and 10.7, goes away in 10.8.8, returns in 10.9.8 and remains through 12.1.1

      The id column is the PK. When run on a 48-core server throughput with is about 1/3 of what it was in 10.4.

      QPS by version:
      {{72785 10.2.30
      70188 10.2.44
      73638 10.3.39
      73106 10.4.34
      29832 10.5.29
      29498 10.6.23
      29104 10.7.8
      76104 10.8.8
      27182 10.9.8
      27366 10.10.7
      25904 10.11.14
      25598 11.4.8
      26044 11.8.3
      25916 12.1.1
      }}
      I don't see anything obvious in the release notes here:
      https://mariadb.com/docs/release-notes/community-server/old-releases/release-notes-mariadb-10-9-series/what-is-mariadb-109

      Also, per explain, the plan for the query has not changed.

      The rate of context switches per query is about 18X larger in 10.9.8 vs 10.8.8

      legend:

      • cs/s - context switches per second
      • cpu/s - CPU utilization from vmstat (us + sy columns)
      • cs/o - context switches per query
      • cpu/o - CPU overhead per query

      {{
      cs/s cpu/s cs/o cpu/o --> for 10.8.8
      186480 80.0 2.450 0.001052

      cs/s cpu/s cs/o cpu/o --> for 10.9.8
      980016 78.2 36.054 0.002879
      }}

      From my framework for running sysbench, using 8 tables with 10M rows per table, the sysbench command line is:
      sysbench --db-driver=mysql --range-size=100 --table-size=10000000 --tables=8 --threads=40 --events=0 --warmup-time=5 --time=630 /home/mdcallag/git/mytools/bench/sysbench.lua/lua/oltp_points_covered.lua run --mysql-user=root --mysql-password=pw --mysql-host=127.0.0.1 --mysql-db=test --rand-type=uniform --random-points=100 --skip-trx

      And the Lua sdripts are here:
      https://github.com/mdcallag/mytools/tree/master/bench/sysbench.lua/lua

      Attachments

        Issue Links

          Activity

            People

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