-
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
ArrayPool trimming does not respect GCHardLimit #853
Comments
actively setting the hardlimit config isn't a main scenario - hardlimit's main usage occurs in the container scenario. and we are very close to end of 3.0 so realistically this will not make it. we can try to get this in for 3.1 though (if the policy allows it). |
Repro:
This program is keeping no more than ~40MB alive at any given point. Run it with |
CC @sergiy-k |
Is this work going to be completed for 6.0.0? If not, we should adjust the milestone. |
Interesting Issue. @jkotas I saw that you merged already a PR. |
I am not sure what PR you are talking about. Fixing this likely requires a lot of experience. The first step is to propose a design for the fix (in English, no code). |
Okay. Then this is the wrong issue for me :D |
Isn’t this a big problem when container limits are specified? |
Is there any way to access the limits via the Docker API or somehow more directly via containerd? |
If your workload uses different ArrayPools a lot, you may need to reserve more memory for the container that what would be strictly required. Is this specific issue a big problem? I am not sure.
The runtime reads the limits and configures the GC based on them today. The problem is not in reading the limits. The problem is in how the limits are applied across the system. |
Putting this as future. This doesn't seem to be a trivial problem to resolve and likely needs to happen early in a release when it does happen. |
From dotnet/coreclr#25437 (comment) :
Let's say I have 32GB physical memory with 16GB of free memory, set COMPlus_GCHeapHardLimit to 200MB, and start using array pool heavily. The array pool is going to see HighMemoryLoadThresholdBytes=~30GB and MemoryLoadBytes=~16GB, so it will not make any attempt to trim and it can cache way over 200MB
The text was updated successfully, but these errors were encountered: