You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Todd Lipcon (Code Review)" <ge...@cloudera.org> on 2017/05/05 01:57:07 UTC

[kudu-CR] cfile set: avoid Status allocation for row not found

Hello David Ribeiro Alves, Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/6804

to look at the new patch set (#2).

Change subject: cfile_set: avoid Status allocation for row not found
......................................................................

cfile_set: avoid Status allocation for row not found

We expect Bloom Filter lookups to typically return "row not found". The
code currently indicates this using a Status::NotFound(). However,
constructing such a status involves an alloc/free pair, which is
relatively expensive to do millions of times per second for this common
case.

In a profile of tcph_real_world, the tserver spends a good chunk of its
CPU in these code paths, especially now that our alloc/free contain
heavier instrumentation for memory accounting.

This changes to using a boost::optional<rowid_t> out-parameter for the
common case instead.

Benchmarked with tpch_real_world SF300 as in change ID
I8b7e703c82ac14fbce3a699bdf6a2f0fb4ed93a1:

                    Before       After
    Mem rejections  62,790       75,318   (1.20x more)
    Wall time       2490s        2185s    (1.14x faster)
    Server CPU      72,873s      61,879s  (1.18x faster)

The increased mem rejections makes sense, since we're now able to insert
a bit faster while maintenance operations stayed the same speed. The CPU
improvements are due to this optimization, and the wall improvement is a
result of the CPU improvement.

Change-Id: I3056aaaf0eec6b7deebcd1f206cb551b75996927
---
M src/kudu/tablet/cfile_set.cc
M src/kudu/tablet/cfile_set.h
M src/kudu/tablet/diskrowset.cc
3 files changed, 33 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/04/6804/2
-- 
To view, visit http://gerrit.cloudera.org:8080/6804
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3056aaaf0eec6b7deebcd1f206cb551b75996927
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>