Andrew Wong has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/14874 )

Change subject: memrowset: small optimizations for scanning
......................................................................

memrowset: small optimizations for scanning

This adds two small optimizations for MRS/CBTree. They should have a
small (maybe not noticeable) effect on user scans, but hopefully will
also improve the speed of flushing by a few percent, which I found to be
CPU bound when using an NVM disk for storage.

- add a new getter to fetch the stored values without also accessing the
  stored keys. In most cases we don't care about the encoded key when
  accessing MRS, so we can avoid potentially following the key pointer
  (should avoid a cache miss)

Shows a small effect in the modified benchmark:

I1210 10:04:46.209149 15145 cbtree-test.cc:795] Time spent Scan 4000000 keys 10 
times (frozen): real 0.638s     user 0.636s     sys 0.000s
I1210 10:04:46.804275 15145 cbtree-test.cc:806] Time spent Scan 4000000 keys 10 
times (frozen, val-only): real 0.595s   user 0.596s     sys 0.000s

... though this one didn't show a major effect in memrowset-test on its
own.

- add prefetching of the MRS values during scanning

Tested with:

  memrowset-test --gtest_filter=\*InsertCount\* --roundtrip_num_rows=10000000 
--gtest_repeat=10

t-test for the "all committed" result shows a significant (though <5%) effect:

data:  subset(d, V1 == "before")$V2 and subset(d, V1 == "after-prefetch")$V2
t = 3.4999, df = 18, p-value = 0.002557
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 0.004876512 0.019523488
sample estimates:
mean of x mean of y
   0.3622    0.3500

Change-Id: Ia44b34606439625fbbbcc83e3652455a8894a0b3
Reviewed-on: http://gerrit.cloudera.org:8080/14874
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <[email protected]>
Reviewed-by: Bankim Bhavsar <[email protected]>
---
M src/kudu/tablet/cbtree-test.cc
M src/kudu/tablet/concurrent_btree.h
M src/kudu/tablet/memrowset.cc
M src/kudu/tablet/memrowset.h
4 files changed, 83 insertions(+), 36 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Adar Dembo: Looks good to me, approved
  Bankim Bhavsar: Looks good to me, but someone else must approve

--
To view, visit http://gerrit.cloudera.org:8080/14874
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia44b34606439625fbbbcc83e3652455a8894a0b3
Gerrit-Change-Number: 14874
Gerrit-PatchSet: 6
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <[email protected]>

Reply via email to