Skip to content

Fix thread contention in Cache - #145

Merged
jjacobelli merged 1 commit into
rapidsai:branch-21.12from
gigony:fix_thread_contention
Nov 30, 2021
Merged

jjacobelli merged 1 commit into
rapidsai:branch-21.12from
gigony:fix_thread_contention

Conversation

@gigony

@gigony gigony commented Nov 10, 2021 •

Copy link
Copy Markdown
Contributor

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 force-pushed the fix_thread_contention branch from 3693c0f to e8b3722 Compare November 10, 2021 07:37
@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
@gigony
gigony force-pushed the fix_thread_contention branch from e8b3722 to ef394f3 Compare November 20, 2021 19:48
@jakirkham

Copy link
Copy Markdown
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 force-pushed the fix_thread_contention branch from ef394f3 to 1c03a76 Compare November 24, 2021 02:23
@gigony gigony changed the title WIP: Fix thread contention in Cache Fix thread contention in Cache Nov 24, 2021
@gigony
gigony requested a review from jakirkham November 24, 2021 02:24
@gigony

gigony commented Nov 24, 2021

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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