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

Query to INFORMATION_SCHEMA.TABLES leads to huge memory usage

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Incomplete
    • 10.2.19
    • N/A
    • Server
    • OC: Cloulinux/CentOS 7.5
      mysql Ver 15.1 Distrib 10.2.19-MariaDB, for Linux (x86_64) using readline 5.1

    Description

      The bug similar to https://bugs.launchpad.net/percona-server/+bug/1380895

      Sometimes after execution requests to INFORMATION_SCHEMA.TABLES mysql use more and more memory.

      SELECT TABLE_SCHEMA as DB,SUM(DATA_LENGTH)+SUM(INDEX_LENGTH) AS SPACEUSED from information_schema.tables WHERE TABLE_TYPE NOT LIKE '%view%' GROUP BY TABLE_SCHEMA;
      

      Memory usage before request. pmap out before request in attach before_pmap.log

      /bin/ps -ylC mysqld | /bin/awk '{x += $8;y += 1} END {print "Memory Usage (MB): "x/1024, "\n\n"}'
      Memory Usage (MB): 51782.2
      

      Execution request.

      Memory usage after request. pmap out after request in attach after_pmap.log

      /bin/ps -ylC mysqld | /bin/awk '{x += $8;y += 1} END {print "Memory Usage (MB): "x/1024, "\n\n"}'
      Memory Usage (MB): 51865.5
      

      Increasing of memory usage happens not every request.
      Unfortunately i don't know exact conditions to reproduce memory leak, but if sometimes run this request on working server where running another sql requests, creates and dropping databases/tables, memory leak happens.

      Attachments

        1. after_pmap.log
          52 kB
        2. before_pmap.log
          52 kB
        3. my.cnf
          1 kB
        4. show_engine_innodb_status
          117 kB
        5. show_status
          55 kB
        6. show_variables
          460 kB

        Activity

          People

            Unassigned Unassigned
            iblinder Igor Blinder
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.