Alexey Serbin has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/23036


Change subject: [tablet] less re-allocation of vectors in RowsetTree
......................................................................

[tablet] less re-allocation of vectors in RowsetTree

Since row check presence is in the hot path for high intensity ingestion
and update workloads, it makes sense to minimize the number of memory
reallocations to help with lock contention in tcmalloc.  I found it's
quite trivial to do so for Tablet::CaptureConsistentIterators() and
RowSetTree::FindRowSets{WithKeyInRange,IntersectingInterval}(), and this
is addressed here.  For more context, in the field we saw extreme
situations when tens (or even 100+) rowset iterators were present
for a scanner per reported metrics, so several reallocations might
be done in RowSetTree::FindRowSets...() methods when growing std::vector
with the standard capacity-doubling strategy.

I also updated rowset_tree-test.cc to use std::stable_sort() instead
of std::sort() to match how it's done in Tablet::BulkCheckPresence().
With that, the performance numbers on bulk key presence checks reported
by TestRowSetTreePerformance scenarios in rowset_tree.cc should be
closer to what it takes in Tablet::BulkCheckPresence().

I verified that the performance with this patch didn't degrade at least
as per the numbers reported by benchmarking scenarios in rowset_tree.cc.

This changelist doesn't contains any functional modifications.

Change-Id: Ia5ffa0cce6b7a94567a7316c4909c7bbcfa1439c
Reviewed-on: http://gerrit.cloudera.org:8080/23018
Tested-by: Kudu Jenkins
Reviewed-by: Abhishek Chennaka <[email protected]>
(cherry picked from commit 675a571201ad4ae2a2e36f7aa27b604ebbf3a180)
---
M src/kudu/tablet/rowset_tree-test.cc
M src/kudu/tablet/rowset_tree.cc
M src/kudu/tablet/rowset_tree.h
M src/kudu/tablet/tablet.cc
4 files changed, 52 insertions(+), 38 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/36/23036/1
--
To view, visit http://gerrit.cloudera.org:8080/23036
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5ffa0cce6b7a94567a7316c4909c7bbcfa1439c
Gerrit-Change-Number: 23036
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <[email protected]>

Reply via email to