MySQL – When to Upgrade RDS Instance Based on Memory Usage

amazon-rdsMySQL

It seems like our DB server is doing garbage collection at a increasingly faster rate, which seem normal since it's growing. What's a good rule of thumb of when to switch to a bigger instance, I'm not a DBA and have no frame of reference. It seems to be doing garbage collection once every 2-3 days now whenever there's only 100mb left.

enter image description here

The server itself has 1.7GB of RAM.

Best Answer

Just ran across this question, and can give you a couple of suggestions.

If you're trying to gauge when to move to a bigger instances (vs. increasing the size of the databases) when you're getting close to hitting some sort of resource limit: Memory, I/O and CPU all have the ability to limit your performance.

The symptom you mention in the question may be a symptom that you're using more and more memory - memory used for cache & buffers are being reclaimed for other uses. Upgrading to a large instance type will increase the amount of available memory.

The chart that Rolando posted should give you a good guideline as to the number of available connections - if you're hitting those limits, then it's time to upgrade. Available connections are directly related to available memory, so hitting connection limits means you should upgrade.

If your CPU is averaging > 50% or so, you might want to start planning on an upgrade.

Finally, if you see consistently high I/O you may want to consider a larger instance (generally, the more powerful the instance the better the I/O) or using provisioned IOPS.