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_sizeis 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 variable | Description |
|---|---|
DBInstanceClassMemory | The memory of the RDS instance type (system variable). |
X/Y | The 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_sizeis 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 family | Instance type | CPU and memory | Default value (MB) | Percentage |
|---|---|---|---|---|
| General-purpose | rds.mysql.s3.large | 4 cores, 8 GB | 7372 | 90% |
| General-purpose | rds.mysql.m1.medium | 4 cores, 16 GB | 14745 | 90% |
| General-purpose | rds.mysql.c1.large | 8 cores, 16 GB | 13107 | 80% |
| General-purpose | rds.mysql.c1.xlarge | 8 cores, 32 GB | 27852 | 85% |
| General-purpose | rds.mysql.c2.xlarge | 16 cores, 64 GB | 52428 | 80% |
| General-purpose | rds.mysql.c2.xlp2 | 16 cores, 96 GB | 78643 | 80% |
| Dedicated | mysql.x4.large.2 | 4 cores, 16 GB | 14745 | 90% |
| Dedicated | mysql.x8.large.2 | 4 cores, 32 GB | 29491 | 90% |
| Dedicated | mysql.x4.xlarge.2 | 8 cores, 32 GB | 27852 | 85% |
| Dedicated | mysql.x8.xlarge.2 | 8 cores, 64 GB | 55705 | 85% |
| Dedicated | mysql.x4.2xlarge.2 | 16 cores, 64 GB | 52428 | 80% |
| Dedicated | mysql.x8.2xlarge.2 | 16 cores, 128 GB | 104857 | 80% |
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/4System reserved memory (in MB) is calculated as:
min(instance memory / 2, 2048) + max(instance CPU * 64, instance memory / 64) + (instance memory / 64) + 285The 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 cores | Instance memory (MB) | Default (MB) | Recommended max (MB) |
|---|---|---|---|
| 2 | 4096 | 1024 | 1024 |
| 2 | 8192 | 4096 | 4096 |
| 2 | 16384 | 9216 | 10240 |
| 4 | 8192 | 4096 | 4096 |
| 4 | 16384 | 9216 | 10240 |
| 4 | 32768 | 21504 | 22528 |
| 8 | 16384 | 9216 | 10240 |
| 8 | 32768 | 21504 | 22528 |
| 8 | 65536 | 45056 | 48128 |
| 12 | 24576 | 15360 | 16384 |
| 12 | 49152 | 33792 | 35840 |
| 12 | 98304 | 69632 | 73728 |
| 16 | 32768 | 21504 | 22528 |
| 16 | 65536 | 45056 | 48128 |
| 16 | 131072 | 93184 | 99328 |
| 24 | 49152 | 32768 | 34816 |
| 24 | 98304 | 69632 | 73728 |
| 24 | 196608 | 140288 | 149504 |
| 32 | 65536 | 45056 | 47104 |
| 32 | 131072 | 93184 | 99328 |
| 32 | 262144 | 188416 | 200704 |
| 52 | 98304 | 67584 | 72704 |
| 52 | 196608 | 140288 | 149504 |
| 52 | 393216 | 283648 | 302080 |
| 64 | 262144 | 188416 | 200704 |
| 64 | 524288 | 378880 | 403456 |
| 102 | 786432 | 569344 | 607232 |
| 104 | 196608 | 138240 | 147456 |
| 104 | 393216 | 282624 | 302080 |
Change the buffer pool size for a single instance
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.
In the left-side navigation pane, click Parameters.
Find innodb_buffer_pool_size, click
to edit the value, and then click OK.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.

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:
Use monitoring to check Disk Read IOPS — a sustained drop indicates the working set is now fitting in memory.
Review slow query logs to identify queries that may still be causing excessive disk reads.
If memory pressure increases after the change, see troubleshoot memory consumption issues for guidance.