-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Correct values for HighMemoryLoadThresholdBytes, MemoryLoadBytes. #32494
Conversation
@naricc was there something left to fix for TotalAvailableMemoryBytes ? Since that was the name of the old PR |
@BrzVlad |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't all this copy-pasted? Please put the function in a header and have it only declared once.
2310893
to
f6c6900
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, though if this fixes the GCMemoryInfo corefx test please re-enable that before merging and mark this PR as fixing the corresponding issue.
f6c6900
to
8ee37bb
Compare
e50f003
to
7990e38
Compare
Renabled test. Can't reenable that test yet.
7990e38
to
15a84e4
Compare
@CoffeeFlux It seems there is still an issue with fragmentation regarding that test I will have to look into before I can re-enable it. |
Which platforms are affected by the issue this addresses and what is the nature of the issue exactly - is it completely broken, slightly off, etc..? Are the values provided in .NET Core 3.1 running on Windows reliable for the purpose of cache management? |
@mikernet this is a Mono-specific change, so it does not affect .NET Core 3.1. We only just recently added the API to Mono as part of larger .NET 5 work, so it has yet to ship to anyone yet :) |
Correct values fort HighMemoryLoadThresholdBytes, MemoryLoadBytes. I looked in the code for CoreCLR and spoke with Maoni Stephens and Jan Kotas about the values used in CoreCLR, so I am confident they are all correct now.
HighMemoryThresholdBytes is a system wide memory usage threshold at which CoreCLR changes its compaction strategy. There is no direct correspondance to anything in mono-sgen. But since it used by software caches to determine when memory in the system is "nearly" exhauste, mono-sgent will use .9 * total physical memory as an acceptable value.