5

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.

Kit Sunde
  • 323
  • 1
  • 3
  • 15

2 Answers2

4

Before you switch server models, you need to know what differences there in configuration

I sat down and carefully looked over all default MySQL settings that would normally be written in a my.cnf. All are values are the same with the exception of two

Amazon set the following values based on server model

MODEL      max_connections innodb_buffer_pool_size
---------  --------------- -----------------------
t1.micro   34                326107136 (  311M)
m1-small   125              1179648000 ( 1125M,  1.097G)
m1-large   623              5882511360 ( 5610M,  5.479G)
m1-xlarge  1263            11922309120 (11370M, 11.103G)
m2-xlarge  1441            13605273600 (12975M, 12.671G)
m2-2xlarge 2900            27367833600 (26100M, 25.488G)
m2-4xlarge 5816            54892953600 (52350M, 51.123G)

For more information see my past posts on MySQL in Amazon RDS

RolandoMySQLDBA
  • 182,700
  • 33
  • 317
  • 520
  • It doesn't seem like this answers my question. I'm trying to understand when garbage collection and memory usage becomes a problem, not so much how to deal with it. I don't currently know if the garbage collection the DB is doing once every 2-3 days is healthy and at what time I should be concerned it's unhealthy, I would like to have some idea before it actually becomes an issue. How to fiddle with settings to free up memory seems like a separate issue, although I welcome the suggestions. – Kit Sunde Oct 12 '12 at 19:28
  • 2
    @KitSunde I think Rolando is indirectly trying to answer what you aren't asking - the title says "when should I upgrade" and he's basically saying upgrading won't address the memory issue, I think (though I am not a SME on this topic) – JNK Oct 12 '12 at 20:28
  • @JNK Where does it say that upgrading isn't going to solve a memory issue? It's saying "here's some things you should know about RDS". I'm not stating I have a memory issue right now, my question is about finding out how to judge when to upgrade something before it's a problem. I could calculate when it'll spend more time garbage collecting than doing any actual work and find a sweet spot for upgrading (or tuning) my server, but I'm sure someone with more experience would have a simpler way of judging these things. I'm not sure if my question is unclear, I'll happily take edit suggestions. – Kit Sunde Oct 12 '12 at 21:55
3

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.

chris
  • 1,222
  • 5
  • 17
  • 29