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

tpcc workload shows regression with MDB-10.6

Details

    Description

      Steps to reproduce:

      1. Load TPCC data set (for the experiment I have used --tables=10 --scale=40) given my 24 cores VM.

      2. Run the TPCC workload.

      Retry (1) and (2) with 10.5 and 10.6. You will observe the significant performance difference.
      check the graph for reference.

      If you try to do (1) with 10.5 (loading with 10.5) and (2) with 10.6 you would see that performance is restored back to the original level as set by 10.5.

      What is going wrong?
      1. there have been multiple changes in the recent 10.6.5 timeframe (#25919) around stats recalculation. It has been observed that with 10.6.5 during/post-loading background stats calculation is not taking place. (This could be confirmed by querying mysql.innodb_table_stats post loading).

      2. Behavior is intermittent and also could also get affected by the configuration of load and machine though there is no set pattern observed. [I was able to reproduce it majority of the times (9 out of 10 times). One suggestion to improve reproducibility: load the machine enough to keep CPU busy with loading of the data].

      Attachments

        Issue Links

          Activity

            krunalbauskar Krunal Bauskar created issue -

            Work-around for the said problem: run Analyze table and re-run the queries things should be back to normal.
            (if you are upgrading old data-directory to use new MDB version things you will not observe the problem).

            krunalbauskar Krunal Bauskar added a comment - Work-around for the said problem: run Analyze table and re-run the queries things should be back to normal. (if you are upgrading old data-directory to use new MDB version things you will not observe the problem).
            krunalbauskar Krunal Bauskar added a comment - - edited

            MDEV-27805: tpcc workload shows regression with MDB-10.6

            • regression got revealed while running tpcc workload.
            • as part of MDEV-25919 changes logic for statistics computation was revamped.
            • if the table has changed to certain threshold then table is added to
              statistics recomputation queue (dict_stats_recalc_pool_add)
            • after the table is added to queue the background statistics thread is
              notified
            • during revamp the condition to notify background statistics threads was
              wrongly updated to check if the queue/vector is empty when it should
              check if there is queue/vector has entries to process.
            • vec.begin() == vec.end() : only when vector is empty
            • also accessing these iterator outside the parallely changing vector is not
              safe
            • fix now tend to notify background statistics thread if the logic adds
              an entry to the queue/vector.

            (patch: https://github.com/MariaDB/server/pull/2014)

            krunalbauskar Krunal Bauskar added a comment - - edited MDEV-27805 : tpcc workload shows regression with MDB-10.6 regression got revealed while running tpcc workload. as part of MDEV-25919 changes logic for statistics computation was revamped. if the table has changed to certain threshold then table is added to statistics recomputation queue (dict_stats_recalc_pool_add) after the table is added to queue the background statistics thread is notified during revamp the condition to notify background statistics threads was wrongly updated to check if the queue/vector is empty when it should check if there is queue/vector has entries to process. vec.begin() == vec.end() : only when vector is empty also accessing these iterator outside the parallely changing vector is not safe fix now tend to notify background statistics thread if the logic adds an entry to the queue/vector. (patch: https://github.com/MariaDB/server/pull/2014 )
            marko Marko Mäkelä made changes -
            Field Original Value New Value
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.7 [ 24805 ]
            Fix Version/s 10.8 [ 26121 ]
            Affects Version/s 10.8.1 [ 26815 ]
            Affects Version/s 10.7.2 [ 26813 ]
            Affects Version/s 10.6.6 [ 26811 ]
            Affects Version/s 10.6.7 [ 26812 ]
            Affects Version/s 10.7.3 [ 26814 ]
            Affects Version/s 10.8.2 [ 26816 ]
            Assignee Marko Mäkelä [ marko ]
            Labels race regression-10.6 statistics
            marko Marko Mäkelä made changes -
            issue.field.resolutiondate 2022-02-11 10:41:24.0 2022-02-11 10:41:24.032
            marko Marko Mäkelä made changes -
            Fix Version/s 10.6.8 [ 27506 ]
            Fix Version/s 10.7.4 [ 27504 ]
            Fix Version/s 10.8.3 [ 27502 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.7 [ 24805 ]
            Fix Version/s 10.8 [ 26121 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            marko Marko Mäkelä made changes -

            People

              marko Marko Mäkelä
              krunalbauskar Krunal Bauskar
              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.