dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.71k stars 3.98k forks source link

VB LookupResult allocations dominating code analysis scenarios #26779

Open sharwell opened 6 years ago

sharwell commented 6 years ago

Version Used: 15.7

Steps to Reproduce:

Run performance testing scenario #26778 on a machine with a large number of CPU cores (I used 28).

Actual Behavior:

Up to 50% of the overall allocations (30+GiB) are VB LookupResult allocations resulting from misses in the shared object pool.

🔗 #26398 contains an initial proposal for resolving this, but it did not reach a resolution.

AlekseyTs commented 6 years ago

@sharwell Could you check if #26845 has any effect on the scenario?

sharwell commented 5 years ago

@AlekseyTs I re-ran this today on a 2990wx and the result was abysmal. Cache misses resulted in allocation rates of 30GB/min (44% of total). Poor use of processor locality further resulted in burning over 1500+ CPU seconds per minute (43% of total) just on accessing this cache (i.e. 25 CPU cores were dedicated to just this cache, but at the end were still missing). This does not count any of the CPU time resulting from the increased allocations.

AlekseyTs commented 5 years ago

@sharwell Is there any information about specific locations where the allocations occur?

sharwell commented 5 years ago

@AlekseyTs

This covers the vast majority of cases.