dotnet / dotnet/msbuild

Determine which usages of ConcurrentDictionary cause contention in multithreaded mode

Open
#13,028 0 comments 0 reactions 0 assignees View on GitHub
Area: Multithreaded Area: Performance triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

We've seen several instances (like #12882) where we
* port something to MT mode
* discover concurrency issue
* fix concurrency issue by moving to ConcurrentDictionary
* surprise! now you have a contention issue

We should run a very large build in MT mode, get a dump, and look specifically for places where our use of ConcurrenctDictionary has exchanged the concurrency issue for a contention issue.

For each of these places we should evaluate more lightweight concurrency solutions - things like Interlocked.CompareExchanged and similar. If necessary, we can consult with the runtime folks (especially Toub et al) to help identity which patterns work best in each scenario.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.