microsoft / service-fabric

Service Fabric is a distributed systems platform for packaging, deploying, and managing stateless and stateful distributed applications and containers at large scale.
https://docs.microsoft.com/en-us/azure/service-fabric/
MIT License
3.03k stars 401 forks source link

[Question] - How to indentify the cause of high CPU usage within a Service Fabric application #1504

Open brewstertimothybrewster opened 4 months ago

brewstertimothybrewster commented 4 months ago

Since a few months we see a steady increase in average CPU usage within our Service Fabric cluster. It started from the 24th of April with a average CPU usage of 29% until the 11th of Juli with a average CPU usage of 80%.

After loggin in to one of the nodes within the cluster, we saw that one of the three Service Fabric applications was consuming alot CPU ranging from 40-90%. image

The 11th of Juli we deleted the Service Fabric Application and redeployed it which decreased the average CPU usage to 16%. But after that the CPU started slowly rising again, at this moment the average CPU usage is 20%.

I tried to investigate this with the Visual Studio diagnostic tools, but the tools are not supported for Service Fabric applications it seems. My question is what are the options/possibillities to investigate this, to find out where the CPU increase is comming from.

Service Fabric Runtime Version: 10.1.2175.9590

Environment:

GitTorre commented 4 months ago

SF services are console apps. In VS cpu diagnostics tool, you simply connect to the service process. So, on your dev machine, launch your SF application from VS, then connect to the target service process and start the analysis session.