KEMBAR78
Fix #97736 in MemoryCache.cs with a lock around the TriggerOvercapacityC... method by ADNewsom09 · Pull Request #103992 · dotnet/runtime · GitHub
Skip to content

Conversation

@ADNewsom09
Copy link
Contributor

@ADNewsom09 ADNewsom09 commented Jun 25, 2024

This solves #97736
This PR addresses the excessive CPU and memory usage during the MemoryCache compaction process by limiting the number of concurrent compaction tasks to one. The change ensures that only one thread performs the compaction at any given time, reducing resource spikes and improving overall performance.

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jun 25, 2024
@dotnet-policy-service
Copy link
Contributor

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

@ADNewsom09
Copy link
Contributor Author

@dotnet-policy-service agree

@ADNewsom09 ADNewsom09 changed the title Update MemoryCache.cs with a lock around the TriggerOvercapacityCompa… Fix #97736 in MemoryCache.cs with a lock around the TriggerOvercapacityC... method Jun 25, 2024
@saraedum
Copy link

@ADNewsom09 would it be appropriate to make @myk0la999 the "author" on your first commit? It seems that you took the code he proposed at #97736 to start this.

@ADNewsom09
Copy link
Contributor Author

ADNewsom09 commented Jun 25, 2024 via email

@jozkee jozkee force-pushed the MemoryCache-fix branch from 7799377 to 3eb61c7 Compare June 27, 2024 16:06
@jozkee
Copy link
Member

jozkee commented Jun 27, 2024

@ADNewsom09 FYI, I've force-pushed to your branch to list @myk0la999 as the author of 4fed137.

git rebase -i did the trick, then I just added an exec git commit --amend --author 'Mykola Konopelskyi <ikonopelskyi@n-ix.com>' --no-edit after the first pick.

@jozkee jozkee merged commit 7899950 into dotnet:main Jun 28, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Extensions-Caching community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants