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

InnoDB persistent statistics fail to update after bulk insert

Details

    Description

      I have a bunch of CentOS 7 servers that I manage and we recently upgraded MariaDB from 10.5 to 10.6 on those servers. Now I'm seeing some odd problems which manifest as serious performance issues after I import a database. Meaning that SQL queries that were running in a short time suddenly became very slow.

      I then found that simply running "mysqlcheck -a" totally fixes the problem and I can reproduce this issue every time but I can't figure out what is causing it.

      In addition to the performance issues that I see, I also see odd stats from information_schema and the cardinality of the indexes. The latter part is I think why the SQL queries become slower.

      You can see a full test of this issue in the attached screenshot. I can put that into a code box but I thought the annotations made it easier to see the problems here. Anyone seen this before or have any idea what it going on?

      EDIT: additional info

      I found that disabling innodb_stats_persistent completely fixes the problem. Of course, that is likely not a real fix. Is there a problem with innodb_stats_persistent in MariaDB 10.6?

      Attachments

        Issue Links

          Activity

            wk_bradp Brad created issue -
            wk_bradp Brad made changes -
            Field Original Value New Value
            Summary MariaDB 10.6.7 issue after import (information_schema data off and other issues) MariaDB 10.6.7 issue after import (
            wk_bradp Brad made changes -
            Summary MariaDB 10.6.7 issue after import ( MariaDB 10.6.7 issue after import (innodb_stats_persistent)
            wk_bradp Brad made changes -
            Summary MariaDB 10.6.7 issue after import (innodb_stats_persistent) MariaDB 10.6.7 issue after import (innodb_stats_persistent issue)
            wk_bradp Brad made changes -
            Description I have a bunch of CentOS 7 servers that I manage and we recently upgraded MariaDB from 10.5 to 10.6 on those servers. Now I'm seeing some odd problems which manifest as serious performance issues after I import a database. Meaning that SQL queries that were running in a short time suddenly became very slow.

            I then found that simply running "mysqlcheck -a" totally fixes the problem and I can reproduce this issue every time but I can't figure out what is causing it.

            In addition to the performance issues that I see, I also see odd stats from information_schema and the cardinality of the indexes. The latter part is I think why the SQL queries become slower.

            You can see a full test of this issue in the attached screenshot. I can put that into a code box but I thought the annotations made it easier to see the problems here. Anyone seen this before or have any idea what it going on?
            I have a bunch of CentOS 7 servers that I manage and we recently upgraded MariaDB from 10.5 to 10.6 on those servers. Now I'm seeing some odd problems which manifest as serious performance issues after I import a database. Meaning that SQL queries that were running in a short time suddenly became very slow.

            I then found that simply running "mysqlcheck -a" totally fixes the problem and I can reproduce this issue every time but I can't figure out what is causing it.

            In addition to the performance issues that I see, I also see odd stats from information_schema and the cardinality of the indexes. The latter part is I think why the SQL queries become slower.

            You can see a full test of this issue in the attached screenshot. I can put that into a code box but I thought the annotations made it easier to see the problems here. Anyone seen this before or have any idea what it going on?

            EDIT: additional info

            I found that disabling innodb_stats_persistent completely fixes the problem. Of course, that is likely not a real fix. Is there a problem with innodb_stats_persistent in MariaDB 10.6?
            wk_bradp Brad made changes -
            Labels performance innodb optimizer performance
            wk_bradp Brad made changes -
            Affects Version/s 10.6.9 [ 27507 ]
            Affects Version/s 10.6.8 [ 27506 ]
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            wk_bradp Brad made changes -
            Attachment wptest.sql [ 65399 ]
            wk_bradp Brad made changes -
            Attachment MDEV-28327_testing-10.5.17.txt [ 65400 ]
            Attachment MDEV-28327_testing-10.8.4.txt [ 65401 ]
            wk_bradp Brad made changes -
            Affects Version/s 10.8.4 [ 27503 ]
            Affects Version/s 10.7.5 [ 27505 ]
            wk_bradp Brad made changes -
            Affects Version/s 10.9.2 [ 27115 ]
            wk_bradp Brad made changes -
            Summary MariaDB 10.6.7 issue after import (innodb_stats_persistent issue) MariaDB issue after import (innodb_stats_persistent issue)
            wk_bradp Brad made changes -
            Summary MariaDB issue after import (innodb_stats_persistent issue) Performance issue after import (innodb_stats_persistent issue)
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            Component/s Storage Engine - InnoDB [ 10129 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.7 [ 24805 ]
            Fix Version/s 10.8 [ 26121 ]
            Fix Version/s 10.9 [ 26905 ]
            Fix Version/s 10.10 [ 27530 ]
            Assignee Thirunarayanan Balathandayuthapani [ thiru ]
            Labels innodb optimizer performance innodb optimizer performance statistics
            Summary Performance issue after import (innodb_stats_persistent issue) InnoDB persistent statistics fail to update after bulk insert
            marko Marko Mäkelä made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Assignee Thirunarayanan Balathandayuthapani [ thiru ] Marko Mäkelä [ marko ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            marko Marko Mäkelä made changes -
            Assignee Marko Mäkelä [ marko ] Thirunarayanan Balathandayuthapani [ thiru ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Status Stalled [ 10000 ] In Testing [ 10301 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Assignee Thirunarayanan Balathandayuthapani [ thiru ] Matthias Leich [ mleich ]
            mleich Matthias Leich made changes -
            Assignee Matthias Leich [ mleich ] Thirunarayanan Balathandayuthapani [ thiru ]
            Status In Testing [ 10301 ] Stalled [ 10000 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Fix Version/s 10.6.11 [ 28441 ]
            Fix Version/s 10.7.7 [ 28442 ]
            Fix Version/s 10.8.6 [ 28443 ]
            Fix Version/s 10.9.4 [ 28444 ]
            Fix Version/s 10.10.2 [ 28410 ]
            Fix Version/s 10.11.1 [ 28454 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.7 [ 24805 ]
            Fix Version/s 10.8 [ 26121 ]
            Fix Version/s 10.9 [ 26905 ]
            Fix Version/s 10.10 [ 27530 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -

            People

              thiru Thirunarayanan Balathandayuthapani
              wk_bradp Brad
              Votes:
              4 Vote for this issue
              Watchers:
              12 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.