none
Trying to figure out what is using memory on Azure Mysql any pointers? RRS feed

  • Question

  • Hi there,

    We have a General Purpose, 8 vCore(s), 512 GB   mysql running mysql 5.7  From what we're reading, it means we should have 40Gb of ram?   We happened to set up an alert at 85% memory usage, and are now hitting it,  but we're not sure why. 

    using 

    http://www.mysqlcalculator.com/ I can account for about 1/2 of the ram.

    we probably have more connections than we need, ( and they're all being used ) but that only accounts for 2Gb ( according to that calculator above ), unless there's a way to check somehow?. 

    looking at the  performance_schema.memory_summary_* tables, and there is nothing significant there (~300MB total in various data structures)  

    is there another way that we can look into this?  are we missing something?


    Tuesday, September 3, 2019 6:39 PM

Answers

  • Hi David,

    I don't see memory consumption being broken down to a more specific metric. What I can do is enable a one-time support request (if you currently don't have an Azure Support Plan) to have this looked at in greater detail. Please send me your Azure Subscription ID to AzCommunity and we can take a closer look. 

    With regard to auditing in a production environment, doing so is advisable is a pre-production shake-out (we are about to go live and need to ensure the environment is ready to go live...) or in a situation where during a lower volume period, you are looking to investigate an issue. It is not advisable to just enable auditing without any forethought, such as scaling up the environment to account for additional resource consumption, etc.

    By routing this question through support, the hope is that there is some added value of looking at your environment that could contibute to an improvement to the overall service. The memory consumption could be entirely by the O/S. 

    Regards,

    Mike

    Thursday, September 5, 2019 7:21 PM
    Moderator

All replies

  • Hi David,

    Have you enabled Audit Logs? You likely will need to do so for a given period of time to get a more granular view of which users are consuming memory. Audit Logs allow for capturing data fro up to 4 defined users. Also, this functionality is available for version 5.7 (versus 5.6) and for version 8.0 (documentation needs to be updated).

    As a note, when you create an Azure Database for MySQL you create a server admin but there is also an 'Azure' user account that you do not have access to but is present as a service. You should also account for this account memory consumption. 

    There are other methods available to monitor your deployment: Monitoring in Azure Database for MySQL (link).

    Please let us know if you have additional questions or need more information.

    Regards,

    Mike

    Wednesday, September 4, 2019 9:30 PM
    Moderator
  • Hi Mike,

    The 85% usage is already coming from Azure monitor which you mention in your second link.  I'm wondering about how to get a breakdown of that 85%,  or I'm wondering if 85% is a reasonable percentage to alert on?  Is there potentially extra caching going on on the server?  is it going to clean itself up ?    

    Re: audit logs,  there really only is one user using the server ( our application server talking to the database, )   do the audit logs show what memory per query is ?  or would I have to go through the queries and see if there's any that seem to be taking a lot of memory manually?   Also, is turning on the Audit logs relatively safe to do on a production server ?

    Cheers,

    Dave

    Wednesday, September 4, 2019 9:48 PM
  • Hi David,

    I don't see memory consumption being broken down to a more specific metric. What I can do is enable a one-time support request (if you currently don't have an Azure Support Plan) to have this looked at in greater detail. Please send me your Azure Subscription ID to AzCommunity and we can take a closer look. 

    With regard to auditing in a production environment, doing so is advisable is a pre-production shake-out (we are about to go live and need to ensure the environment is ready to go live...) or in a situation where during a lower volume period, you are looking to investigate an issue. It is not advisable to just enable auditing without any forethought, such as scaling up the environment to account for additional resource consumption, etc.

    By routing this question through support, the hope is that there is some added value of looking at your environment that could contibute to an improvement to the overall service. The memory consumption could be entirely by the O/S. 

    Regards,

    Mike

    Thursday, September 5, 2019 7:21 PM
    Moderator