-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
intentresolver: batch intent resolution across transactions by range
This PR modifies the IntentResolver to batch intent resolution across different transactions on a (best effort) per range basis. It acheives this batching by plumbing RangeDescriptorCache into the IntentResolver so that an intent-range mapping can be determined and then using the RequestBatcher introduced in concurrently without requiring additional goroutines this change extends the interface to allow the client to provide the response channel. **Performance Wins** The change yields significant throughput wins in targetted benchmarks. We expect that write-heavy workloads which generate a large number of intents scattered over ranges to benefit most from this change. The following benchmarks were run using kv0 with a batch size of 10 and secondary indices enabled (see command). On both 4- and 32-core nodes a ~30% throughput increase is observed. ``` ./workload run kv '{pgurl:1-3}' --init --splits=256 --duration 90s --batch 10 --secondary-index --read-percent=0 --concurrency=512 ``` 8-Core ``` name old ops/s new ops/s delta Cockroach 510 ± 3% 651 ± 7% +27.58% (p=0.008 n=5+5) ``` 32-core ``` name old ops/s new ops/s delta KV0 1.01k ± 3% 1.32k ± 1% +30.78% (p=0.008 n=5+5) ``` No change in performance for TPCC was observed: 8-Core (400 warehouses) ``` _elapsed_______tpmC____efc__avg(ms)__p50(ms)__p90(ms)__p95(ms)__p99(ms)_pMax(ms) 300.0s 6073.2 94.5% 180.0 167.8 268.4 318.8 402.7 2013.3 name old ops/s new ops/s delta tpmc 6.09k ± 1% 6.08k ± 0% ~ (p=0.886 n=4+4) ``` 32-Core (1500 warehouses) ``` _elapsed_______tpmC____efc__avg(ms)__p50(ms)__p90(ms)__p95(ms)__p99(ms)_pMax(ms) 300.0s 19303.0 93.8% 342.5 335.5 453.0 520.1 704.6 3623.9 name old ops/s new ops/s delta tpmc 19.3k ± 0% 19.3k ± 0% ~ (p=1.000 n=4+4) ``` Release note (performance improvement): Increase write throughput for workloads which write large numbers of intents by coalescing intent resolution requests across transactions.
- Loading branch information
Showing
6 changed files
with
183 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.