Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-2839

Tablestats safety precaution does not work for RDS/Aurora instances

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 1.13.0
    • Fix Version/s: 1.15.0
    • Labels:
      None

      Description

      When adding MySQL metrics via pmm-admin, by default if exporter finds out more then 1000 tables in the system, it will automatically disable tablestats feature.

      See from documentation:

      {{--disable-tablestats-limit}}Specify the maximum number of tables for which collection of table statistics is enabled (by default, the limit is 1 000 tables).

       

      But there is no similar precaution when a RDS instance is added via "Add an AWS RDS MySQL or Aurora MySQL Instance" option in PMM. This may result in a very expensive queries being executed on systems having lots of tables/partitions.

      An example from user's RDS instance:

      *************************** 2. row ***************************
           Id: 75946937
         User: pmm
         Host: ec2-***.compute-1.amazonaws.com:38894
           db: NULL
      Command: Query
         Time: 148
        State: Sending data
         Info: SELECT t.table_schema, t.table_name, column_name, `auto_increment`,
                        pow(2, case data_type
                          when 'tinyint'   then 7
                          when 'smallint'  then 15
                          when 'mediumint' then 23
                          when 'int'       then 31
                          when 'bigint'    then 63
                          end+(column_type like '% unsigned'))-1 as max_int
                        FROM information_schema.tables t
                        JOIN information_schema.columns c
                          ON BINARY t.table_schema = c.table_schema AND BINARY t.table_name = c.table_name
                        WHERE c.extra = 'auto_increment' AND t.auto_increment IS NOT NULL
      

      Steps to reproduce:

      • create RDS instance
      • create 1500 tables on it
      • add RDS instance to PMM using "Add an AWS RDS MySQL or Aurora MySQL Instance" option
      • check the MySQL Table Statistics dashboard - the RDS instance reports are there!

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                przemyslaw.malkowski@percona.com Przemyslaw Malkowski
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 5 hours, 4 minutes
                  5h 4m