-
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
ArrayPool degradation above 70% memory utilization #13289
Comments
In worst case, the current array pool policies may send you on a death spiral above 70% memory utilization: The array pool will start flushing itself after every Gen2 GC, that produces a lot of garbage that needs to be collected, that triggers more GCs, that causes more trimming, … |
@jeffschwMSFT, why did you move this issue to corefx? The ArrayPool implementation is in coreclr. |
@stephtoub my mistake... moving it back :) |
😄 (single repo for the win) |
I'm not sure what we can do here in a "global" sense. If the GC is under significant pressure the You can already create your own private pool, which doesn't collect (i.e. We're already doing some logic to favor larger arrays. We could try to add more logic to tweak our aggressiveness, but I worry about unintended consequences. Not saying that we shouldn't do anything, I'm just voicing my concerns. I'd love to see more detailed scenarios. @Maoni0 do you have any suggestions on how to play nicer with the GC? |
That does not help. Close to none of the APIs that use ArrayPool as implementation detail take a custom array pool as an input. |
Perhaps when trimming due to pressure, the pool size should be temporarily reduced? Like:
Just a thought... |
@jkotas I suppose this is not new for 3.0 or a regression right? I just ask because I was about to triage this as Future but wanted to double check. |
Correct. This is not a regression. |
Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process. This process is part of our issue cleanup automation. |
This issue will now be closed since it had been marked |
From https://gitter.im/dotnet/corefx?at=5d043a468e050f62aa1ccc18 :
using the arraypool is great in theory but since it responds to gc pressure once you start getting collections you lose most benefit from it.
The text was updated successfully, but these errors were encountered: