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

Fix thread contention in Cache #145

Merged
merged 1 commit into from
Nov 30, 2021

Conversation

gigony
Copy link
Contributor

@gigony gigony commented Nov 10, 2021

Needs to rebase once #141 is merged.

When multiple threads are used, it can cause thread contentions so
performance can be degraded.

image

It is found that the performance degradation is due to lock() method in cuCIM's cache implementation.

image

This patch fixes the issue by using a hash value for the index of the mutex pool.
Also, the default mutex pool size is increased from 11117 to 100003.

image

After Fix

Note:: experiment on JPEG-compressed SVS had an incorrect configuration (start location and patch size was specified as (128,256) instead of (120, 240)) so updated it in both documents and Google Spreadsheet.
image

image

image

Close #146

@gigony gigony added the bug Something isn't working label Nov 10, 2021
@gigony gigony added this to the v21.12.00 milestone Nov 10, 2021
@gigony gigony requested a review from a team as a code owner November 10, 2021 02:10
@gigony gigony self-assigned this Nov 10, 2021
@gigony gigony requested a review from a team as a code owner November 10, 2021 02:10
@gigony gigony added the non-breaking Introduces a non-breaking change label Nov 10, 2021
@gigony gigony changed the title WIP: Fix thread contention in Cache Fix thread contention in Cache Nov 20, 2021
@gigony gigony changed the title Fix thread contention in Cache WIP: Fix thread contention in Cache Nov 20, 2021
@jakirkham
Copy link
Member

PR ( #141 ) is in. So this is ready for rebasing

When multiple threads are used, it can cause thread contentions so
performance can be degraded.
This patch fixes the issue by using a hash value for the index.
@gigony gigony changed the title WIP: Fix thread contention in Cache Fix thread contention in Cache Nov 24, 2021
@gigony
Copy link
Contributor Author

gigony commented Nov 24, 2021

PR ( #141 ) is in. So this is ready for rebasing

@jakirkham
Please help merge this when you have time.

@gigony gigony mentioned this pull request Nov 29, 2021
@jakirkham
Copy link
Member

@gpucibot merge

@jjacobelli jjacobelli merged commit f80bf00 into rapidsai:branch-21.12 Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Introduces a non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Performance is degraded for some range of threads when using multithreads
3 participants