All Products
Search
Document Center

ApsaraDB RDS:Change the size of the InnoDB buffer pool

Last Updated:Mar 28, 2026

Query performance degrades when your working set — the data and indexes InnoDB reads most often — cannot fit in memory, forcing repeated disk reads. The innodb_buffer_pool_size parameter controls how much memory InnoDB allocates for this cache. Increasing it keeps your working set in memory, reducing disk I/O and CPU wait time. Decreasing it frees memory for other workloads.

Prerequisites

Before you begin, ensure that you have:

  • An RDS MySQL instance running one of the following editions: RDS High-availability Edition, RDS Basic Edition, or RDS Cluster Edition

Limitations

  • Serverless instances: Manual modification of innodb_buffer_pool_size is not supported. Serverless ApsaraDB RDS for MySQL adjusts the buffer pool size automatically when the instance specification changes.

  • Out of memory (OOM) risk: Setting the value too large can cause OOM errors and trigger a primary/secondary switchover. Stay within the recommended maximum values in this topic.

When to change the buffer pool size

Increase the buffer pool when server memory is sufficient and you observe high disk I/O under normal load. To check whether your current buffer pool is too small, monitor the Disk Read IOPS metric for your instance in the Monitoring section. If read IOPS is high and unstable under normal load, the working set is likely spilling to disk — consider increasing the buffer pool size. A larger buffer pool also benefits write-heavy workloads: bulk UPDATE statements incur less lock wait and less disk dependency when frequently modified rows stay in memory.

Decrease the buffer pool when memory resources are limited or other applications on the host require more memory.

How the formula works

innodb_buffer_pool_size can only be set using a formula — direct numeric values are not supported. The formula syntax is:

{DBInstanceClassMemory*X/Y}

Example: {DBInstanceClassMemory*7/10} sets the buffer pool to 70% of instance memory.

Formula variableDescription
DBInstanceClassMemoryThe memory of the RDS instance type (system variable).
X/YThe ratio of buffer pool size to instance memory. Choose a ratio that keeps the buffer pool within the recommended range.

Adjustable range: [128 MB, DBInstanceClassMemory * 9/10]

  • Minimum: 128 MB

  • Maximum: 90% of the instance memory available to the database process

Buffer pool capacity rounding

The actual buffer pool size is always a multiple of innodb_buffer_pool_chunk_size × innodb_buffer_pool_instances. If the value you set is not an exact multiple, the system rounds up to the nearest multiple.

  • innodb_buffer_pool_chunk_size is fixed at 32 MB. For instances created earlier, it may be 128 MB.

If you set a value that is not a valid multiple, the system adjusts it upward automatically. For example, if innodb_buffer_pool_chunk_size is 1 GB and innodb_buffer_pool_instances is 1, setting innodb_buffer_pool_size to 1.5 GB results in an actual value of 2 GB.

Default and recommended values

High-performance local disk instances

For the instance types listed below, the default buffer pool size is 80%–90% of instance memory. For all other instance types, the default is 75% of instance memory (instance memory * 3/4).

Instance familyInstance typeCPU and memoryDefault value (MB)Percentage
General-purposerds.mysql.s3.large4 cores, 8 GB737290%
General-purposerds.mysql.m1.medium4 cores, 16 GB1474590%
General-purposerds.mysql.c1.large8 cores, 16 GB1310780%
General-purposerds.mysql.c1.xlarge8 cores, 32 GB2785285%
General-purposerds.mysql.c2.xlarge16 cores, 64 GB5242880%
General-purposerds.mysql.c2.xlp216 cores, 96 GB7864380%
Dedicatedmysql.x4.large.24 cores, 16 GB1474590%
Dedicatedmysql.x8.large.24 cores, 32 GB2949190%
Dedicatedmysql.x4.xlarge.28 cores, 32 GB2785285%
Dedicatedmysql.x8.xlarge.28 cores, 64 GB5570585%
Dedicatedmysql.x4.2xlarge.216 cores, 64 GB5242880%
Dedicatedmysql.x8.2xlarge.216 cores, 128 GB10485780%

Disk instances

General-purpose instance types: The default buffer pool size is 75% of instance memory (instance memory * 3/4).

Dedicated instance types: The default buffer pool size is calculated as:

(instance memory - system reserved memory) * 3/4

System reserved memory (in MB) is calculated as:

min(instance memory / 2, 2048) + max(instance CPU * 64, instance memory / 64) + (instance memory / 64) + 285

The following table lists the default and recommended maximum buffer pool sizes for dedicated disk instance types. Use the Recommended max value as your target maximum when setting innodb_buffer_pool_size.

CPU coresInstance memory (MB)Default (MB)Recommended max (MB)
2409610241024
2819240964096
216384921610240
4819240964096
416384921610240
4327682150422528
816384921610240
8327682150422528
8655364505648128
12245761536016384
12491523379235840
12983046963273728
16327682150422528
16655364505648128
161310729318499328
24491523276834816
24983046963273728
24196608140288149504
32655364505647104
321310729318499328
32262144188416200704
52983046758472704
52196608140288149504
52393216283648302080
64262144188416200704
64524288378880403456
102786432569344607232
104196608138240147456
104393216282624302080

Change the buffer pool size for a single instance

  1. Go to the Instances page. In the top navigation bar, select the region where your RDS instance resides. Find the instance and click its ID.

  2. In the left-side navigation pane, click Parameters.

  3. Find innodb_buffer_pool_size, click 修改 to edit the value, and then click OK.

  4. Click Submit Parameters, and then click OK in the confirmation dialog box.

Modifying innodb_buffer_pool_size requires a restart for RDS MySQL 5.6. For RDS MySQL 5.7 and 8.0, no restart is required.

Change the buffer pool size for multiple instances

Create a parameter template containing the innodb_buffer_pool_size parameter and apply it to the target instances. If you already have a template with this parameter, update the value in the template and apply it to multiple instances at once.

Parameter template modification

For details, see Use parameter templates.

What's next

After adjusting innodb_buffer_pool_size, monitor your instance to verify the change is working as expected:

References