Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
Yes—some CPU usage can come from activity outside the application itself, and a difference between plan-level CPU and app-level CPU can indicate CPU consumed by system or kernel activity rather than only the app process.
For Azure App Service, the supported way to investigate periodic spikes is:
- In the Azure portal, open the App Service.
- Go to Monitoring > Metrics.
- Add CPU Time and CPU Percentage for the App Service Plan.
- Check whether the spikes align with any other metric changes.
- Open Diagnose and solve problems and run High CPU Analysis for an automated assessment.
- Also review HTTP Requests Analysis or the Requests metric to confirm whether the spikes correlate with request volume.
To identify what is consuming CPU during the spike window:
- Open the Kudu console for the app:
https://<your-app>.scm.azurewebsites.net - Go to Process Explorer.
- During a spike, inspect the worker process.
- Collect a Full Dump from w3wp.exe, or enable Collect IIS Events and click Start Profiling.
- Reproduce or wait for the spike, then stop profiling.
- Analyze the resulting trace in Visual Studio or PerfView to find the CPU-intensive code path.
What the available guidance supports:
- High CPU can be caused by application code paths such as tight loops, heavy serialization, expensive regular expressions, sitemap generation, or report generation.
- If slowness or spikes correlate with increased request volume, scaling out or enabling autoscale is recommended.
- If CPU is consistently higher than expected, scaling up or scaling out the App Service plan is also recommended.
- Overall CPU can exceed the sum of app CPU because system or kernel services are included in overall CPU usage.
What is not established by the available guidance:
- No supported statement is available here that confirms a specific periodic Linux App Service platform task, container-management cycle, warm-up cycle, or health operation as the cause of the recurring pattern you observed.
- No supported statement is available here that says this exact recurring 23–24% pattern is expected behavior for a P0v3 Linux Web App for Containers.
Based on the supported guidance, this should be investigated first as a CPU-consumption issue by measuring plan metrics, checking request correlation, and capturing a dump or profiler trace during the spike to determine whether the CPU is coming from the app workload or from non-app/system activity visible at the plan level.
References: