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

Fixed documentation for MemoryLoadBytes #10303

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

mrsharm
Copy link
Member

@mrsharm mrsharm commented Aug 23, 2024

Summary

Fixed documentation for the MemoryLoadBytes section as it was misleading before as it's not a percentage but a quantity with units in bytes.

Fixes an issue in the runtime repo: dotnet/runtime#106712

CC: @Maoni0 @cshung @mangod9 @markples

@mrsharm mrsharm requested a review from a team as a code owner August 23, 2024 18:37
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Aug 23, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-runtime

This comment was marked as outdated.

Copy link
Contributor

@gewarren gewarren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating this. The wording wasn't exactly clear to me, so I left a suggested change.

xml/System/GCMemoryInfo.xml Outdated Show resolved Hide resolved
Co-authored-by: Genevieve Warren <[email protected]>
Copy link
Contributor

@gewarren gewarren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, forgot to change the link in my previous review. We're required to leave off the learn.microsoft.com/locale part of URLs for them to resolve in air-gapped environments.

xml/System/GCMemoryInfo.xml Outdated Show resolved Hide resolved

This comment was marked as outdated.

@Maoni0
Copy link
Member

Maoni0 commented Aug 23, 2024

this still reads a bit confusing to me. for example, not sure how the reader would interpret what memory load is a field in the MEMORYSTATUS structure in bytes means and this was the original confusion indicated in dotnet/runtime#94565. I'd suggest we enumerate all cases to make it very clear, something like this -

when a process is not running in a container or running in a container without a memory limit -

  • on windows this is (the memory load field of the MEMORYSTATUS structure (which is a percentage) * total physical memory available on the machine).
  • on Linux this is the MemAvailable field in /proc/meminfo.
  • on FreeBSD...
  • ...

when a process is running in a container with a memory limit -

  • on Windows...
  • ...

also CC-ing @janvorli for review on info about non windows side of things.

Co-authored-by: Genevieve Warren <[email protected]>

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

@mrsharm
Copy link
Member Author

mrsharm commented Sep 12, 2024

@janvorli, any feedback here? Explicitly highlighted the source of the memory load calculation, which prior to this change was ambiguously stated. Based on the code of GCToOSInterface::GetMemoryStatus, there were two cases: one with a memory limit set and one without whether in a container or not -- these were basically added to the documentation.

Copy link

Learn Build status updates of commit 832b8f5:

✅ Validation status: passed

File Status Preview URL Details
xml/System/GCMemoryInfo.xml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

@gewarren gewarren requested a review from janvorli October 2, 2024 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Runtime community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants