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

Massive trigger performance drop after update

    XMLWordPrintable

Details

    Description

      We discovered a performance degration after updating from 10.6.10 to 10.6.11:

      • 10.6.10 executes the update of 4Mio rows with an attached trigger in about 8 seconds.
      • 10.6.11 needs nearly 10 minutes for the same update.

      The issue is reproducible with the attached 'test.sql' script. The update without a trigger is not affected.

      // 10.6.10
      $ time mariadb -uroot -proot --port=3303 --protocol=TCP test < test.sql 
      info	rtime
      UPDATE t1	00:00:14
      info	rtime
      UPDATE t2	00:00:08
       
      real	1m30,441s
      user	0m0,002s
      sys	0m0,015s{quote}
      

      // 10.6.11
      $ time mariadb -uroot -proot --port=3303 --protocol=TCP test < test.sql 
      info	rtime
      UPDATE t1	00:00:13
      info	rtime
      UPDATE t2	00:09:50
       
      real	11m12,014s
      user	0m0,012s
      sys	0m0,007s
      

      The server was started in a container with

      docker run -p 3303:3306 --name maridadb -e MARIADB_DATABASE=test -e MARIADB_ROOT_PASSWORD=root -d mariadb:10.6.10
      // and
      docker run -p 3303:3306 --name maridadb -e MARIADB_DATABASE=test -e MARIADB_ROOT_PASSWORD=root -d mariadb:10.6.11
      

      Addtional observation: when looking at the strace output of the mariadb-process, there seem to be many futex-ETIMEDOUT errors with a duration of 0.1-0.4secs.

      [pid  1290] futex(0x55b52c067c2c, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1670854395, tv_nsec=849093000}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT <0.400039>
      [pid  1290] futex(0x55b52c067c40, FUTEX_WAKE_PRIVATE, 1) = 0 <0.000016>
      [pid  1290] futex(0x55b52c067c2c, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1670854396, tv_nsec=17567000}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT  <0.168297>
      [pid  1290] futex(0x55b52dbac238, FUTEX_WAKE_PRIVATE, 1) = 1 <0.000016>
      [pid  1290] futex(0x55b52c067c40, FUTEX_WAKE_PRIVATE, 1) = 0 <0.000014>
      [pid  1290] futex(0x55b52c067c2c, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1670854396, tv_nsec=249321000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
      

      Attachments

        1. test.sql
          1 kB
        2. testv2.sql
          1 kB

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              pskiwi Andreas Pillath
              Votes:
              2 Vote for this issue
              Watchers:
              5 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.