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

Performance regression between 10.0.4 and 10.0.5 (~8%)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.0.6
    • 10.0.8
    • None
    • None

    Description

      As Axel mentioned in his E-mail, there is performance regression between 10.0.4 and 10.0.5:

      Date: Thu, 21 Nov 2013 18:32:45 +0100
      From: Axel Schwenke <axel@askmonty.org>
      To: "maria-developers@lists.launchpad.net" <maria-developers@lists.launchpad.net>
      Subject: [Maria-developers] MariaDB-10.0-beta sysbench results

      Looking for this regression I can see clear performance drop with the following revision:

      revno: 3427.1.258
      revision-id: knielsen@knielsen-hq.org-20130823120213-pbhsq4zc1h3jwa0i
      parent: knielsen@knielsen-hq.org-20130823081643-f3yhupp15yw9cpy4
      committer: knielsen@knielsen-hq.org
      branch nick: work-10.0-mdev26
      timestamp: Fri 2013-08-23 14:02:13 +0200
      message:
        MDEV-26: Global transaction ID.
       
        Implement @@gtid_binlog_state. This is the internal state of the binlog
        (most recent GTID logged for every domain_id and server_id). This allows
        to save the state before RESET MASTER and restore it afterwards.

      Specifically sys_vars.cc part:

      static unsigned char opt_gtid_binlog_state_dummy;
      static Sys_var_gtid_binlog_state Sys_gtid_binlog_state(
             "gtid_binlog_state",
             "The internal GTID state of the binlog, used to keep track of all "
             "GTIDs ever logged to the binlog.",
             GLOBAL_VAR(opt_gtid_binlog_state_dummy), NO_CMD_LINE);

      If I comment it out, I get nice performance boost. Note that it doesn't seem to have anything to do with gtid functionality accessed by Sys_var_gtid_binlog_state methods: I removed all references to gtid code and still observe performance degradation.

      It seem to be somehow caused by increase of system variables. If I add new system variable (on revision 3816), I can see performance degradation:

      static ulong table_cache_instances1;
      static Sys_var_ulong Sys_table_cache_instances1(
             "table_open_cache_instances1",
             "MySQL 5.6 compatible option. Not used or needed in MariaDB",
             READ_ONLY GLOBAL_VAR(table_cache_instances1), CMD_LINE(REQUIRED_ARG),
             VALID_RANGE(1, 64), DEFAULT(1),
             BLOCK_SIZE(1), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL),
             ON_UPDATE(NULL), NULL);

      The difference is like:
      64 threads, time spent: 60s, queries executed: 9326530, qps: 155442, 1 thread qps: 2428

      vs

      64 threads, time spent: 60s, queries executed: 9879031, qps: 164650, 1 thread qps: 2572

      I was unable to reproduce performance boost with fresh 10.0 by commenting out gtid_binlog_state.

      Even simpler patch for revision 3816 to see performance degradation:

      === modified file 'sql/sys_vars.cc'
      --- sql/sys_vars.cc	2013-08-14 08:48:50 +0000
      +++ sql/sys_vars.cc	2013-12-14 18:24:15 +0000
      @@ -2694,6 +2694,8 @@
              BLOCK_SIZE(1), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL),
              ON_UPDATE(NULL), NULL);
       
      +char buf[sizeof(Sys_table_cache_instances)];
      +
       static Sys_var_ulong Sys_thread_cache_size(
              "thread_cache_size",
              "How many threads we should keep in a cache for reuse",
       

      Attachments

        Issue Links

          Activity

            People

              svoj Sergey Vojtovich
              svoj Sergey Vojtovich
              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.