-
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
Performance regression in ConcurrentDictionary #27440
Comments
The timing is about right for this to be tiered compilation. |
My first thought too, so I asked @kouvel first. I thought it was because of the only recent change on |
You can disable with |
I ran a benchmark on the scenario that regressed in ASP.NET MVC, and disabling TC doesn't make it better, so it doesn't look like this is the reason. TC=1: 484,487 RPS (and better startup time + first request obviously) For anyone interested I can share the etl traces before and after the regression, that show |
Does it align with any changes in ConcurrentDictionary - I'm not sure whether you're saying it is possibly the IsEmpty change, or definitely not. If it is possibly that change, can you try with it reversed? cc @tarekgh |
No. IsEmpty was modified back on June 2nd, but: And TryGetValue hasn't been touched in years as far as I can tell. I'm unable to get to the provided benchmark link. |
@stephentoub open the link on Edge. TLS version issues IFAIR. |
Thanks. That worked. From those graphs, the IsEmpty test that suffered was when the dictionary wasn't empty, which makes it even less likely to be related to that change. I think it's more likely to be JIT related. Are there are any other tests across all suites that took a hit around then? |
Also, am I reading the graphs right that the most recent runs have eliminated most of the regression? |
The IsEmpty regression [edit: in benchview] is most likely due to tiered compilation being enabled by default. With the change to use BenchmarkDotNet, this class of regressions should go away. The issue @sebastienros is seeing is something different, we're working on determining what that is. |
I ran another benchmark with Tiered on and off on our Response Caching scenario which uses a So yes, it looks like a side effect of Tiered compilation. |
@sebastienros, did I understand correctly that the Response Caching scenario is performing worse with tiered compilation on compared with tiered compilation off on the same runtime build? There are some known perf issues with tiering, in particular when it comes to benchmarking https://github.com/dotnet/coreclr/issues/19751 is an issue that would likely be hit. Is it possible that this could be an issue in the way the perf harness measures perf? Are there a repeatable set of steps I can follow to reproduce the results you're seeing? |
@kouvel I am sending the repro by email |
/cc @Eilon |
@sebastienros / @kouvel - so of course this doesn't matter for 2.2 anymore, but is there a follow-up investigation that needs to occur for 3.0? |
Yes I'm currently working on fixing https://github.com/dotnet/coreclr/issues/19752 for 3.0, that should cover the regressions that were seen |
Keeping https://github.com/dotnet/coreclr/issues/19752 as the primary issue and closing this one as duplicate |
From Benchview, 90% regression on
IsEmpty
and 40% onTryGetValue
, around August 19th.benchview link
The impact is visible in ASP.NET on the scenarios that rely on
ConcurrentDictionary
like routing and response caching, by about 10%.The text was updated successfully, but these errors were encountered: