MySQL Memory Usage Too High

For databases storing mission-critical application data

Scale up the instance class by referring to Changing a DB Instance Class.

For databases not storing mission-critical application data

Check the memory usage of the local computer. If the memory usage curve is stable, no action is required.

For databases storing mission-critical application data and configured with large instance classes

  1. During off-peak hours, change the value of performance_schema to OFF. For MySQL 5.6 and earlier versions, you need to reboot the database for the change to take effect.
  2. On the Cloud Eye console, view the memory usage of the DB instance.
    If the memory usage of the DB instance remains high, perform either of the following operations:
    • Scale up the instance class.
    • Change the innodb_buffer_pool_size value:
      • If the instance memory is 2 GB, change innodb_buffer_pool_size to 268,435,456 in byte (256 MB).
      • If the instance memory is 4 GB, change innodb_buffer_pool_size to 1,073,741,824 in byte (1 GB).
      • If the instance memory is 8 GB, change innodb_buffer_pool_size to 3,221,225,472 in byte (3 GB).
      • If the instance memory is greater than 8 GB, you do not need to adjust the innodb_buffer_pool_size value.

Change the value of innodb_buffer_pool_size as needed.