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

Developers can observe notable performance improvements in MemoryCache #46970

Closed
13 tasks done
jeffhandley opened this issue Jan 14, 2021 · 6 comments
Closed
13 tasks done
Assignees
Labels
area-Extensions-Caching Bottom Up Work Not part of a theme, epic, or user story Cost:S Work that requires one engineer up to 1 week Priority:3 Work that is nice to have tenet-performance Performance related issue User Story A single user-facing feature. Can be grouped under an epic.
Milestone

Comments

@jeffhandley
Copy link
Member

jeffhandley commented Jan 14, 2021

With a collection of changes that were identified through profiling, we can gain as much as +15% RPS for the TechEmpower Cached Queries benchmark.

Product improvements

Benchmark improvements

Proof of concept

Bugs Introduced

Microbenchmark results

Source

Method Runtime Mean Ratio Allocated
GetHit .NET 5.0 167.73 ns 1.00 -
GetHit .NET 6.0 112.15 ns 0.67 -
TryGetValueHit .NET 5.0 163.23 ns 1.00 -
TryGetValueHit .NET 6.0 103.77 ns 0.64 -
GetMiss .NET 5.0 115.63 ns 1.00 -
GetMiss .NET 6.0 90.21 ns 0.78 -
TryGetValueMiss .NET 5.0 116.12 ns 1.00 -
TryGetValueMiss .NET 6.0 92.80 ns 0.80 -
SetOverride .NET 5.0 394.62 ns 1.00 424 B
SetOverride .NET 6.0 286.34 ns 0.73 224 B
CreateEntry .NET 5.0 390.19 ns 1.00 424 B
CreateEntry .NET 6.0 76.73 ns 0.20 224 B
AddThenRemove_NoExpiration .NET 5.0 61,943.36 ns 1.00 60,546 B
AddThenRemove_NoExpiration .NET 6.0 53,270.07 ns 0.86 54,674 B
AddThenRemove_AbsoluteExpiration .NET 5.0 70,461.50 ns 1.00 73,331 B
AddThenRemove_AbsoluteExpiration .NET 6.0 55,862.63 ns 0.79 54,290 B
AddThenRemove_RelativeExpiration .NET 5.0 66,384.71 ns 1.00 61,026 B
AddThenRemove_RelativeExpiration .NET 6.0 49,905.29 ns 0.75 33,889 B
AddThenRemove_SlidingExpiration .NET 5.0 70,597.44 ns 1.00 74,099 B
AddThenRemove_SlidingExpiration .NET 6.0 49,301.41 ns 0.70 40,017 B
AddThenRemove_ExpirationTokens .NET 5.0 72,186.78 ns 1.00 71,771 B
AddThenRemove_ExpirationTokens .NET 6.0 65,962.42 ns 0.91 66,490 B
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Jan 14, 2021
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@jeffhandley jeffhandley added this to the 6.0.0 milestone Jan 14, 2021
@jeffhandley jeffhandley added Bottom Up Work Not part of a theme, epic, or user story User Story A single user-facing feature. Can be grouped under an epic. area-Extensions-Caching and removed untriaged New issue has not been triaged by the area owner labels Jan 14, 2021
@ghost
Copy link

ghost commented Jan 14, 2021

Tagging subscribers to this area: @eerhardt, @maryamariyan
See info in area-owners.md if you want to be subscribed.

Issue Details

With a collection of changes that were identified through profiling, we can gain as much as +15% RPS for the TechEmpower Cached Queries benchmark.

Work Items

Bugs Introduced

Author: jeffhandley
Assignees: jeffhandley, adamsitnik
Labels:

Bottom Up Work, User Story, area-Extensions-Caching

Milestone: 6.0.0

@jeffhandley jeffhandley added the Priority:3 Work that is nice to have label Jan 14, 2021
@ygra
Copy link

ygra commented Jan 14, 2021

#45962 (use Timer, most probably will get rejected)

This seems to reference the wrong pull request; it's the same one as the one before, and doesn't seem to have anything to do with a timer. Perhaps #45842 was intended to be linked here?

@jeffhandley
Copy link
Member Author

Thanks, @ygra!

@adamsitnik adamsitnik added tenet-performance Performance related issue Cost:S Work that requires one engineer up to 1 week labels Jan 14, 2021
@adamsitnik
Copy link
Member

@sebastienros is there any chance that you could add the Caching benchmark to the first page of the PowerBI report?

@adamsitnik
Copy link
Member

@jeffhandley I've updated the issue description and closed the proof of concept PR, so our work here is done. I am closing the issue.

@ghost ghost locked as resolved and limited conversation to collaborators Feb 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Extensions-Caching Bottom Up Work Not part of a theme, epic, or user story Cost:S Work that requires one engineer up to 1 week Priority:3 Work that is nice to have tenet-performance Performance related issue User Story A single user-facing feature. Can be grouped under an epic.
Projects
None yet
Development

No branches or pull requests

4 participants
@jeffhandley @ygra @adamsitnik and others