-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 minimum memory size value from 200MB to 20MB #77682
Conversation
@vargaz -- Can this be included in .NET7 Service branch |
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3378416796 |
What is the customer impact of this fix ? |
.NET 6.0+ on s390x does not understand memory and cpu limits in containers. The corresponding place in CoreCLR, where minimum memory size is set to 20M is: runtime/src/coreclr/gc/gcpriv.h Lines 4062 to 4067 in a6f4527
and the implementation at around line 45176 in src/coreclr/gc/gc.cpp:
#ifdef FEATURE_EVENT_TRACE |
There is a fix in for .NET 7. s390x doesn't use the CoreCLR runtime so it was recreated for mono. I doubt it will be backported to .NET 6 but that's not my call. |
Note that the main code change to respect per-container CPU and memory limit is already in .NET 7. However, that current implementation (erroneously) always allows the container to use at least 200MB, while the intended lower limit was supposed to be 20MB. This PR simply corrects that mistake. The customer impact of missing this PR depends on the particular customer scenario. Of course, if a customer only runs containers of size 200MB or larger, there is no impact. But if a customer intends to run many very small containers on a single system, then the erroneous lower limit of 200MB might cause overall memory resources to be exhausted, leading to out-of-memory scenarios (e.g. containers being killed). |
Typo caused value to be 200MB instead of 20MB.