Hello Mike Percy,

I'd like you to do a code review. Please visit

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

to review the following change.


Change subject: consensus: avoid extra calls to protobuf SpaceUsed in the log 
cache
......................................................................

consensus: avoid extra calls to protobuf SpaceUsed in the log cache

The SpaceUsed function appears to be somewhat expensive since it walks
the entire protobuf structure. In complex protobufs (like those with
larger schemas) this can cause a lot of cache misses, etc. In fact,
SpaceUsed shows up as one of the top 5 CPU consumers in a YCSB workload
I'm looking at.

This patch adds the cached value of SpaceUsed to the log cache so that
it only needs to be computed upon insertion and not during removal.

Change-Id: I0439995fb1369a3333b7d5858518d01277b53076
---
M src/kudu/consensus/log_cache.cc
M src/kudu/consensus/log_cache.h
2 files changed, 26 insertions(+), 19 deletions(-)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0439995fb1369a3333b7d5858518d01277b53076
Gerrit-Change-Number: 9093
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Mike Percy <[email protected]>

Reply via email to