MySQL Forums
Forum List  »  Performance

How to figure out memory left
Posted by: Serge Rivest
Date: August 29, 2013 06:25PM

Hi,

Background
----------

We're using MySQL 5.5 on Amazon RDS. Instance has 34GB RAM of which 27GB are allocated to innodb buffer pool and the rest is Free (7GB). They don't let us SSH into the instance itself to run commands.

However, they provide us with some metrics to track:

http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html#rds-metricscollected

Two metrics are given to us to monitor trend in memory usage:

- FreeableMemory
- SwapUsage


Problem
-------

Recently we've seen our "Freeable Memory" dropping quite low (500MB out of 7GB), a drop of about 2GB within 12h. We've contacted support to get information about how this metric was calculated and if there was a way to spot what was causing the issue on our server before it start swapping. They simply said that all was fine and to simply monitor the swap metric.

I'd like to understand however, how I can figure out what the server is using outside the innodb buffer pool. Is there a set of variables I can look at that would show me what is using that ram segment?

eg:

- Total: 34GB
- Innodb buffer pool: 27GB (this one we've got plenty of details for it)
- Remainder: 7GB
- Allocated to connections: ?
- Connection 1: ?
- Connection 2: ?
- ...
- Allocated to threads: ?
- Thread 1: ?
- Thread 2: ?
- ...
- Allocated to binary log
- Cache: ?
- ...
- Allocated to tables with MEMORY engine
- Table x: ?
- Table y: ?
- ...
- Allocated to ...

... and so on.

So we could spot trends and be able to troubleshoot why we're running out; what is responsible for chewing memory before we run out and are forced to swap.

We would also like to know if some of that memory is "freeable" for a lack of a better term, meaning that it would currently be allocated by mysql but could be expired if needed. How do we figure that out, is there a variable for it? It really looks like the "show engine innodb status" gives us a good idea for what's within innodb but we're clueless about the rest of mysql usage. We've looked at our current settings and it really seems like we wouldn't fill 6GB+ of RAM with memory used by threads & al.

Thanks for your help!

Options: ReplyQuote


Subject
Views
Written By
Posted
How to figure out memory left
6394
August 29, 2013 06:25PM
1698
September 01, 2013 11:36AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.