Home > Blockchain >  Finding specific function for high CPU in Azure Function App
Finding specific function for high CPU in Azure Function App

Time:12-29

I have an Azure Function App that contains a number of functions. I suspect one of these functions is consuming high CPU, is there a way to view the CPU usage based on the specific function?

CodePudding user response:

  • Azure Portal - Function App Menu - Diagnostic Settings - Check the "Function Application Logs" and "All Metrics" and Send to the Log Analytics workspace (destination) that creates a diagnostic setting and save it. enter image description here

In the Azure Portal - Function App - Diagnose and Solve Problems - Click on the "Availability and Performance" for CPU Analysis on Functions.

  • Make Sure you have enabled the App Insights resource associated with that function app is integrated.
  • In the "CPU Analysis", you can check the each instance CPU Usage and "CPU drill down" option is for App Level CPU Usage.

Not Sure can we determine the CPU Usage per function because Scaling Controller control the scaling of instances due to/based on high CPU Utilization, I/O requests, High Utilization of Service Bus Queue, Storage Queues of Function App and only few information provided about CPU Usage in Function App by Microsoft.

CodePudding user response:

  1. Go to Azure Portal
  2. Choose your Web Apps
  3. On the Left pane choose Diagnose and Solve Problems

In this way you can find the high CPU utilization for any app

enter image description here

And also choose Availability and Performance

enter image description here

enter image description here

you can check High CPU Analysis as shown below

enter image description here

enter image description here

And Memory Analysis as shown below

enter image description here

  • Related