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

slow server status - dict_sys_get_size()

    XMLWordPrintable

Details

    Description

      Hello,

      On enviroment with 3M tables and MariaDB 10.1.37, "server status;" is painfully slow, it tooks almost 10 seconds to complete query.

      It's caused by dict_sys_get_size function that was introduced by fix of MDEV-13325. MariaDB spends almost whole time in this function.
      It tooks about 0.01 seconds to complete this query on MariaDB 10.1.21.

      --- aaa.c	2018-12-07 20:19:24.948128381 +0100
      +++ mariadb-10.1.37/storage/xtradb/dict/dict0dict.cc	2018-10-31 22:54:07.000000000 +0100
      @@ -25,9 +25,6 @@
       Created 1/8/1996 Heikki Tuuri
       ***********************************************************************/
       
      -#include <time.h>
      -#include <sys/time.h>
      -
       #include "dict0dict.h"
       #include "fts0fts.h"
       #include "fil0fil.h"
      @@ -7258,8 +7255,6 @@
       ulint
       dict_sys_get_size()
       {
      -	struct timeval t1, t2;
      -	gettimeofday(&t1, NULL);
       	ulint size = 0;
       
       	ut_ad(dict_sys);
      @@ -7285,8 +7280,5 @@
       
       	mutex_exit(&dict_sys->mutex);
       
      -	gettimeofday(&t2, NULL);
      -	ib_logf(IB_LOG_LEVEL_INFO, "call dict_sys_get_size: %f", (double) (t2.tv_sec - t1.tv_sec) + ((double) (t2.tv_usec - t1.tv_usec)) / 1000000);
      -
       	return (size);
       }
      

      Dec  4 17:00:49 -------- mysqld: 2018-12-04 17:00:49 139919386642176 [Note] InnoDB: call dict_sys_get_size: 7.715302
      Dec  4 21:25:24 -------- mysqld: 2018-12-04 21:25:24 139919441475328 [Note] InnoDB: call dict_sys_get_size: 4.888833
      

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              bambuch Adam Bambuch
              Votes:
              0 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.