Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide managed APIs for our canonical set of runtime performance counters #36571

Closed
tommcdon opened this issue Nov 30, 2018 · 14 comments
Closed

Comments

@tommcdon
Copy link
Member

tommcdon commented Nov 30, 2018

AB#1117223
Provide the data needed to build managed performance counters

@shirhatti
Copy link
Contributor

@pakrym To help provide list of counters that ASP.NET needs

@shirhatti
Copy link
Contributor

@jorive @vancem to help provide list of counters

@vancem
Copy link
Contributor

vancem commented Dec 12, 2018

Currently these are the existing live metrics possible on Azure Portal

        Http 5XX, DataIn, DataOut, #Requests, ResponseTime.
        Ave Working set, CPU, Private Bytes
        Connections, Request in App Queue, Current Assemblies, Gen 0, 1, 2, Handle Count, Http Errors (various)
        Windows I/O Read, Write, Other, Thread Count, # AppDomain

They are a reasonable set.

Web site for ASP.NET perf counters https://stackify.com/asp-net-performance-counters/

Key counters mentioned

  1. Managed Memory Used
  2. Web Traffic.
  3. Exceptions, % Time in GC, #Gen0, #Gen1, #Gen2,
  4. CPU Time, Process Memory Used,

Desktop runtime counters https://docs.microsoft.com/en-us/dotnet/framework/debug-trace-profile/performance-counters

@shirhatti
Copy link
Contributor

shirhatti commented Dec 12, 2018

Final list of EventCounters as per our design meeting today

System Counters

  • Working set memory
  • CPU
  • Handles

Exception performance counters

  • Exceptions thrown

Thread performance counters

  • Threads
  • TPL threads
  • Total queue length
  • work items processed

Lock performance counters

  • Lock contentions

Memory performance counters

  • Bytes in all heaps
  • Gen 0/1/2 collections
  • % time in GC
  • Gen 0/1/2 and LOH size
  • Allocation rate

Networking performance counters

  • Bytes received/sent
  • Connections
  • Requests queued/aborted/failed/succeeded

JIT Counters

  • IL Bytes Jitted

Loader

  • Current Assemblies loaded

In addition to this, we need counters in

  • ASP.NET
  • ADO.NET
  • EF

[EDIT]: Some customer feedback from the XAP team, added the IL Bytes Jitted and Current Assemblies counters.

@tommcdon
Copy link
Member Author

@noahfalk What are your thoughts on whether we should try to make the underlying API's that we use for perf counters public? Some are currently internal and others are public - for example CPU is internal (pre-existing), but workingset is public (pre-existing).

@noahfalk
Copy link
Member

In general I think we should aim to have some API public. In the case of CPU it is internal because there is another API in System.Diagnostics.Process.dll in CoreFX that exposes the data to customers. We couldn't use it because of layering but customers won't have that constraint.

@noahfalk
Copy link
Member

noahfalk commented Apr 23, 2019

We have issue #20372 tracking a specific of runtime counters to be added for 3.0 whereas the scope of this issue is slightly broader including ASP.NET, ADO.NET and EF. I think we could afford to have the up-stack counters not appear during 3.0. Moving this to Future.
cc @tommcdon @sywhang

@sywhang sywhang transferred this issue from dotnet/diagnostics May 15, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label May 15, 2020
@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this issue. Please help me learn by adding exactly one area label.

@tommcdon tommcdon removed the untriaged New issue has not been triaged by the area owner label May 15, 2020
@tommcdon tommcdon added this to the 5.0 milestone May 15, 2020
@ghost
Copy link

ghost commented May 15, 2020

Tagging subscribers to this area: @tommcdon
Notify danmosemsft if you want to be subscribed.

@tommcdon
Copy link
Member Author

Depends on #34648, #31951, #1099, #1098

@tommcdon
Copy link
Member Author

@sywhang do you have a PR for this issue?

@sywhang
Copy link
Contributor

sywhang commented Jul 27, 2020

There are issues I filed for API reviews. Some of them were closed because there are ways to compute them using the managed APIs:

#36324 (JIT metrics): this one has some discussions going on regarding what metrics to expose. I think it might be better to hold off on this for 6.0 so that we can expose all the right metrics instead of adding just a couple of ones that we are currently using so that we have a more complete story, unless you think we should get it into 5.0?

#36068: there is a way to get this using managed API already.

#36071: same as above

#36069: same as above.

@tommcdon
Copy link
Member Author

Thank you! I will move this to 6.0 based off of the current status of the JIT metrics issue (#36324)

@tommcdon tommcdon modified the milestones: 5.0.0, 6.0.0 Jul 27, 2020
@tommcdon tommcdon removed the p1 label Oct 13, 2020
@josalem
Copy link
Contributor

josalem commented Jul 21, 2021

closed via #55046

@josalem josalem closed this as completed Jul 21, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Aug 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants