Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Metrics for improved memory pool diagnosability #59442

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

Closed
adityamandaleeka opened this issue Dec 11, 2024 · 3 comments
Closed

Metrics for improved memory pool diagnosability #59442

adityamandaleeka opened this issue Dec 11, 2024 · 3 comments
Assignees
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Comments

@adityamandaleeka
Copy link
Member

adityamandaleeka commented Dec 11, 2024

Now that we have meters with dimensions it should be possible to emit per connection metrics on bytes buffered/consumed.

This may be too granular, so another approach we should consider is aggregating these somehow (one idea is to do it per request method).

cc @davidfowl @NickCraver

Additional context

No response

@ghost ghost added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label Dec 11, 2024
@adityamandaleeka adityamandaleeka added this to the .NET 10 Planning milestone Dec 11, 2024
@davidfowl
Copy link
Member

davidfowl commented Dec 12, 2024

Some obvious ones:

Metric Name Description Unit Example
TotalAllocatedMemory Total memory allocated for blocks since the pool was created. Bytes 5242880 (5 MB)
CurrentMemory Memory currently held in the pool (available for reuse). Bytes 1048576 (1 MB)

The other suggestion was a histogram of memory usage per request (we need to figure out the buckets).

Spoke to @JamesNK and came up with a special (suggested by @NickCraver) histogram counter that we could turn on per request that shows memory usage with the request method as a dimension.

The histogram bucket would start at 1024 and go up in powers of 2 (we can use 14 buckets), then the max value would be 16 megs (which would be kinda crazy πŸ˜„).

@BrennanConroy
Copy link
Member

PeakAllocatedMemory
AllocationRate (more like usage rate since a majority of memory is pooled?) (e.g. get 4kb, return 4kb, get 4kb all in a second, would be 8kb/sec)

@adityamandaleeka
Copy link
Member Author

Superseded by #61594

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

No branches or pull requests

3 participants