Will Berkeley has submitted this change and it was merged. (
http://gerrit.cloudera.org:8080/12614 )
Change subject: KUDU-2711 (part 2): use a RWMutex for TSDescriptor
......................................................................
KUDU-2711 (part 2): use a RWMutex for TSDescriptor
One reason that GetTableLocations can end up slow is contention on the
TSDescriptor object.
This patch changes the spinlock to an rw_spinlock.
The benchmark improves throughput by about 77%:
table_locations-itest --gtest_filter=\*Bench\* \
--benchmark_num_tablets 300 --benchmark_num_threads 30 \
--benchmark_runtime_secs=10
before fix:
Count: 10555
Mean: 8567.29
Percentiles:
0% (min) = 68
25% = 7712
50% (med) = 8320
75% = 9152
95% = 10880
99% = 12224
99.9% = 17024
99.99% = 27776
100% (max) = 30384
with rwlock:
Count: 18758
Mean: 4024.09
Percentiles:
0% (min) = 136
25% = 3472
50% (med) = 4032
75% = 4512
95% = 5248
99% = 6048
99.9% = 7712
99.99% = 13440
100% (max) = 13976
Change-Id: Id48635e49f11d20fa1802b17a3ff5771632dfd01
Reviewed-on: http://gerrit.cloudera.org:8080/12614
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <[email protected]>
Reviewed-by: Todd Lipcon <[email protected]>
Reviewed-by: Alexey Serbin <[email protected]>
---
M src/kudu/master/ts_descriptor.cc
M src/kudu/master/ts_descriptor.h
2 files changed, 20 insertions(+), 19 deletions(-)
Approvals:
Kudu Jenkins: Verified
Adar Dembo: Looks good to me, approved
Todd Lipcon: Looks good to me, approved
Alexey Serbin: Looks good to me, but someone else must approve
--
To view, visit http://gerrit.cloudera.org:8080/12614
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id48635e49f11d20fa1802b17a3ff5771632dfd01
Gerrit-Change-Number: 12614
Gerrit-PatchSet: 3
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Will Berkeley <[email protected]>