[SERVER-32055] Improve multi thread performance for retryable writes Created: 21/Nov/17 Updated: 30/Oct/23 Resolved: 28/Nov/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.6.0-rc4 |
| Fix Version/s: | 3.6.1, 3.7.1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Randolph Tan | Assignee: | Randolph Tan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Backport Requested: |
v3.6
|
||||||||||||
| Sprint: | Sharding 2017-12-04 | ||||||||||||
| Participants: | |||||||||||||
| Comments |
| Comment by Githook User [ 30/Nov/17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Randolph Tan', 'username': 'renctan', 'email': 'randolph@10gen.com'}Message: (cherry picked from commit b821d0c6a2c4fcbb3b8947e4969b48921f920897) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 28/Nov/17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Randolph Tan', 'username': 'renctan', 'email': 'randolph@10gen.com'}Message: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Randolph Tan [ 22/Nov/17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
It looks like there is a bottleneck in the ShardingState mutex. I tried a test patch where I skipped accessing the ShardingState inside the OpObserver if ns == config.transactions, I was able to get some gains. For example, before the fix, the mixed_insert throughput has a degradation of around 32.6% at 512 threads, with the patch, it was down to 17%. Without the patch the mixed_findOne has 16.7% degradation at 512 threads, and with the patch, it was down to 4%. Here's some raw data: Retry:
Baseline:
|