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

Consider despawning idle SRV GC threads when DATAS is in use #102116

Open
jkotas opened this issue May 11, 2024 Discussed in #102093 · 2 comments
Open

Consider despawning idle SRV GC threads when DATAS is in use #102116

jkotas opened this issue May 11, 2024 Discussed in #102093 · 2 comments
Milestone

Comments

@jkotas
Copy link
Member

jkotas commented May 11, 2024

Discussed in #102093

Originally posted by neon-sunset May 10, 2024
Currently, SRV GC + DATAS will nicely scale down heapcount to 1/2/3 heaps on light to moderate long-running allocation traffic, keeping memory usage lower and throughput higher than WKS GC.

This is particularly useful and important for lightweight NativeAOT deployments, especially when they are published as native libraries (e.g. #102048)

However, as DATAS scales down the heapcount, it does not scale down the respective GC threads, keeping the entire Environment.ProcessorCount set of threads alive throughout the lifetime of the application. This leads to a scenario where only one GC thread is active when GC is triggered and all others sit idle without doing useful work.

This can be particularly problematic as modern systems often come with lots of cores - due to SMT, even 8-core systems have at least 16 GC threads alive, 32 threads alive for 16C and so on and so forth. This will only keep getting worse as manufacturers add E-cores. It is also already problematic on osx-* RIDs as they also have additional autorelease pool thread per core.

Has despawning of idle threads that do not have a heap associated with them been considered for DATAS? If so, is there a reasoning, besides "we just did not get to this yet" to keep .ProcessorCount of GC threads alive at all times?

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label May 11, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/gc
See info in area-owners.md if you want to be subscribed.

@mangod9 mangod9 removed the untriaged New issue has not been triaged by the area owner label May 12, 2024
@mangod9 mangod9 added this to the 9.0.0 milestone May 12, 2024
@mangod9
Copy link
Member

mangod9 commented May 12, 2024

Thanks for creating this issue. This is something we have considered and will investigate once current DATAS tuning work is complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants