50

Amazon RDS has a metric for 'freeable memory'. It appears to go up & down in a sawtooth pattern.

This leads me to believe that it's memory that is being used by MySQL for caching and that when the cache expires, more freeable memory appears. Any definitive documentation would be great.

Adam Nelson
  • 1,557
  • 3
  • 13
  • 12
  • 1
    Hey Adam, I scoured Google and Yahoo. Nobody has posted any AWS Management Console input anywhere. I also see that you posted this question in many forums in the past. I hope you find you answer someday soon. – RolandoMySQLDBA Mar 03 '11 at 21:25

4 Answers4

29

It includes cached memory and memory used for buffers (besides what's really free/unused). They'll all be freed if an application requests more memory than what's free.

Giovanni Tirloni
  • 5,693
  • 3
  • 24
  • 49
28

It is basically available RAM. See answer from AWS here https://forums.aws.amazon.com/thread.jspa?threadID=209720 and the official documentation is here http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_BestPractices.html.

If you have a lot of freeable memory you can downgrade to a smaller instance. If you are running out of freeable memory, then it is time to upgrade.

AstroTom
  • 578
  • 6
  • 6
  • 1
    "If you have a lot of freeable memory you can downgrade to a smaller instance." - I suspected this, but (not surprisingly) nowhere in Amazon documents does it say this. – ToolmakerSteve Apr 05 '19 at 20:25
8

From this Q&A on the AWS Forum:

The freeable memory includes the amount of physical memory left unused by the system plus the total amount of buffer or page cache memory that are free and available.

So it's freeable memory across the entire system. While MySQL is the main consumer of memory on the host we do have internal processes in addition to the OS that use up a small amount of additional memory.

If you see your freeable memory near 0 or also start seeing swap usage then you may need to scale up to a larger instance class or adjust MySQL memory settings. For example decreasing the innodb_buffer_pool_size (by default set to 75% of physical memory) is one way example of adjusting MySQL memory settings.

dr_
  • 1,035
  • 11
  • 19
4

FreeableMemory is the memory that's being consumed by OS cache, and it will be given back when needed and nothing to worry about.

fraank
  • 141
  • 1
  • A caveat to this is database performance that is relying on that cache. Query performance may change considerably if suddenly large portions of the cache are evicted to free up memory for something else. – ives Oct 22 '20 at 21:29