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 2016/08/31 23:13:59 UTC
[kudu-CR] log block manager: reduce allocation at startup
Hello Adar Dembo,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/4192
to review the following change.
Change subject: log_block_manager: reduce allocation at startup
......................................................................
log_block_manager: reduce allocation at startup
I found while restarting some servers that have a lot of blocks that
reading the block metadata files at startup got rather slow. In
particular, a profile revealed that the biggest CPU consumer was
allocation from deserializing BlockRecordPBs.
This changes the reading of the metadata files so that it reuses a
single BlockRecordPB instance and thus avoids allocation.
Change-Id: I441a00df6eb3ff10f21b45909f461698c79370ce
---
M src/kudu/fs/log_block_manager.cc
1 file changed, 25 insertions(+), 24 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/92/4192/1
--
To view, visit http://gerrit.cloudera.org:8080/4192
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I441a00df6eb3ff10f21b45909f461698c79370ce
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
[kudu-CR] log block manager: reduce allocation at startup
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change.
Change subject: log_block_manager: reduce allocation at startup
......................................................................
Patch Set 1:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/4192/1/src/kudu/fs/log_block_manager.cc
File src/kudu/fs/log_block_manager.cc:
Line 1671: void LogBlockManager::ProcessBlockRecord(const BlockRecordPB& record,
What if you moved this into LogBlockContainer? Then you wouldn't need the observer pattern at all; ReadContainerRecords() could just call ProcessBlockRecord directly.
I think this separation is a holdover from when we'd load records into the global map. AFAICT, no LogBlockManager state is actually accessed here (i.e. this function could just as easily be static).
PS1, Line 1709: default:
: LOG(FATAL) << "Found unknown op type in block record: "
: << record.DebugString();
BTW, if you like downgrade support, we should probably downgrade this to a WARNING.
--
To view, visit http://gerrit.cloudera.org:8080/4192
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I441a00df6eb3ff10f21b45909f461698c79370ce
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-HasComments: Yes
[kudu-CR] log block manager: reduce allocation at startup
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has abandoned this change.
Change subject: log_block_manager: reduce allocation at startup
......................................................................
Abandoned
doesn't seem to be an issue now, and Adar added metadata compaction
--
To view, visit http://gerrit.cloudera.org:8080/4192
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: abandon
Gerrit-Change-Id: I441a00df6eb3ff10f21b45909f461698c79370ce
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>