Todd Lipcon has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/9760 )
Change subject: meta_cache: improve multi-threaded scalability ...................................................................... meta_cache: improve multi-threaded scalability When profiling a multi-threaded 'kudu perf loadgen' I found the bottleneck was on the rw_spinlock acquisition in MetaCache::LookupTabletByKeyFastPath as well as some contention in RemoteTablet::stale(). This fixes the first by switching to a percpu_rwlock and the second by using an atomic bool instead of a spinlock-protected bool. This moved LookupTabletByKeyFastPath from the first line of the profile (14% of CPU) down to the 8th line (3% of CPU). Change-Id: I38c8a94ea177bfa4f4e2048355464f76a5daa2ba Reviewed-on: http://gerrit.cloudera.org:8080/9760 Reviewed-by: Adar Dembo <a...@cloudera.com> Tested-by: Todd Lipcon <t...@apache.org> --- M src/kudu/client/meta_cache.cc M src/kudu/client/meta_cache.h M src/kudu/util/locks.h 3 files changed, 25 insertions(+), 17 deletions(-) Approvals: Adar Dembo: Looks good to me, approved Todd Lipcon: Verified -- To view, visit http://gerrit.cloudera.org:8080/9760 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I38c8a94ea177bfa4f4e2048355464f76a5daa2ba Gerrit-Change-Number: 9760 Gerrit-PatchSet: 5 Gerrit-Owner: Todd Lipcon <t...@apache.org> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Dan Burkert <danburk...@apache.org> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <t...@apache.org>