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

Implement Device Cache to replace EFCoreSecondLevelCacheInterceptor #11901

Merged

Conversation

gnattu
Copy link
Member

@gnattu gnattu commented Jun 1, 2024

The EFCoreSecondLevelCacheInterceptor will place a huge lock even for reading. Implement a ConcurrentDictionary cache to replace it.

Changes

Issues

Closes #11823

@gnattu gnattu requested a review from a team June 1, 2024 00:04
@gnattu gnattu added the stable backport Backport into the next stable release label Jun 1, 2024
@gnattu gnattu force-pushed the remove-efcore-secondlevelcache branch from a67810e to c8754b8 Compare June 2, 2024 05:10
@DaRealHansForSure
Copy link

Thats a fucking Awesome Pull Request

I manually merged it into my Branch and my Server is Running since 25h without Issues, less Performance issues and MUCH MUCH less Memory.

Always when the DB Lock kicked in, a chain reaction happened and Memory increased huge.

Thank you

@gnattu gnattu requested a review from crobibero June 29, 2024 06:11
@gnattu gnattu requested a review from cvium July 1, 2024 19:12
gnattu added 12 commits July 20, 2024 20:19
The EFCoreSecondLevelCacheInterceptor will place a huge lock even for reading. Implement a ConcurrentDictionary cache to replace it.

Signed-off-by: gnattu <gnattuoc@me.com>
Signed-off-by: gnattu <gnattuoc@me.com>
Signed-off-by: gnattu <gnattuoc@me.com>
Signed-off-by: gnattu <gnattuoc@me.com>
Signed-off-by: gnattu <gnattuoc@me.com>
Signed-off-by: gnattu <gnattuoc@me.com>
Signed-off-by: gnattu <gnattuoc@me.com>
Signed-off-by: gnattu <gnattuoc@me.com>
Signed-off-by: gnattu <gnattuoc@me.com>
Signed-off-by: gnattu <gnattuoc@me.com>
Signed-off-by: gnattu <gnattuoc@me.com>
@gnattu gnattu force-pushed the remove-efcore-secondlevelcache branch from bd87e04 to 7f12677 Compare July 20, 2024 12:19
Signed-off-by: gnattu <gnattuoc@me.com>
Copy link
Member

@Bond-009 Bond-009 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd filter before sorting

Jellyfin.Server.Implementations/Devices/DeviceManager.cs Outdated Show resolved Hide resolved
Jellyfin.Server.Implementations/Devices/DeviceManager.cs Outdated Show resolved Hide resolved
Co-authored-by: Bond-009 <bond.009@outlook.com>
Co-authored-by: Bond-009 <bond.009@outlook.com>
@gnattu gnattu mentioned this pull request Jul 20, 2024
5 tasks
@joshuaboniface joshuaboniface merged commit b7bc0e1 into jellyfin:release-10.9.z Jul 21, 2024
12 of 13 checks passed
@joshuaboniface
Copy link
Member

This did miss 10.9.8 due to me not noticing it - sorry. It will land in 10.9.9, likely some time this week or next weekend.

@JamsRepos
Copy link

Is there something we can apply temporarily in the meantime? My server is suffering dramatically because of it currently.

@cvium
Copy link
Member

cvium commented Jul 22, 2024

There's a workaround in the linked issue

@JamsRepos
Copy link

There's a workaround in the linked issue

Apologies, must've missed that. Much obliged 😀

@gnattu gnattu deleted the remove-efcore-secondlevelcache branch July 30, 2024 04:00
Bond-009 pushed a commit that referenced this pull request Aug 5, 2024
Implement Device Cache to replace EFCoreSecondLevelCacheInterceptor

Original-merge: b7bc0e1

Merged-by: joshuaboniface <joshua@boniface.me>

Backported-by: Bond_009 <bond.009@outlook.com>
@jellyfin-bot jellyfin-bot removed the stable backport Backport into the next stable release label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants