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/03/24 19:48:23 UTC
[kudu-CR] rowset metadata: use flat map for column->block mapping
Hello Adar Dembo,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/6470
to review the following change.
Change subject: rowset_metadata: use flat_map for column->block mapping
......................................................................
rowset_metadata: use flat_map for column->block mapping
In a server with around 1T of data, the std::map<> here was taking
around 25MB of RAM.
Based on an experiment, a map<int,int> with 40 entries takes 1648 bytes
whereas a flat_map<int,int> (after shrink_to_fit) takes 344 bytes. So,
this should save around 20M of RAM from that server (and improve memory
locality while we're at it).
Change-Id: I1b7eaac3481672c69709009b6eacc2008027d4cd
---
M src/kudu/tablet/delta_compaction.cc
M src/kudu/tablet/diskrowset.cc
M src/kudu/tablet/rowset_metadata.cc
M src/kudu/tablet/rowset_metadata.h
4 files changed, 12 insertions(+), 6 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/70/6470/1
--
To view, visit http://gerrit.cloudera.org:8080/6470
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b7eaac3481672c69709009b6eacc2008027d4cd
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] rowset metadata: use flat map for column->block mapping
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Hello Adar Dembo, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/6470
to look at the new patch set (#3).
Change subject: rowset_metadata: use flat_map for column->block mapping
......................................................................
rowset_metadata: use flat_map for column->block mapping
In a server with around 1T of data, the std::map<> here was taking
around 25MB of RAM.
Based on an experiment, a map<int,int> with 40 entries takes 1648 bytes
whereas a flat_map<int,int> (after shrink_to_fit) takes 344 bytes. So,
this should save around 20M of RAM from that server (and improve memory
locality while we're at it).
Change-Id: I1b7eaac3481672c69709009b6eacc2008027d4cd
---
M src/kudu/tablet/delta_compaction.cc
M src/kudu/tablet/diskrowset.cc
M src/kudu/tablet/rowset_metadata.cc
M src/kudu/tablet/rowset_metadata.h
4 files changed, 21 insertions(+), 9 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/70/6470/3
--
To view, visit http://gerrit.cloudera.org:8080/6470
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I1b7eaac3481672c69709009b6eacc2008027d4cd
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] rowset metadata: use flat map for column->block mapping
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change.
Change subject: rowset_metadata: use flat_map for column->block mapping
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/6470
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1b7eaac3481672c69709009b6eacc2008027d4cd
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No
[kudu-CR] rowset metadata: use flat map for column->block mapping
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change.
Change subject: rowset_metadata: use flat_map for column->block mapping
......................................................................
Patch Set 1:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/6470/1/src/kudu/tablet/rowset_metadata.h
File src/kudu/tablet/rowset_metadata.h:
Line 68: typedef boost::container::flat_map<ColumnId, BlockId> ColumnIdToBlockIdMap;
> Nit: add a comment so no one accidentally replaces this with std::map.
Done
Line 102: void SetColumnDataBlocks(const std::map<ColumnId, BlockId>& blocks_by_col_id);
> warning: function 'kudu::tablet::RowSetMetadata::SetColumnDataBlocks' has a
Done
--
To view, visit http://gerrit.cloudera.org:8080/6470
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1b7eaac3481672c69709009b6eacc2008027d4cd
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes
[kudu-CR] rowset metadata: use flat map for column->block mapping
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has submitted this change and it was merged.
Change subject: rowset_metadata: use flat_map for column->block mapping
......................................................................
rowset_metadata: use flat_map for column->block mapping
In a server with around 1T of data, the std::map<> here was taking
around 25MB of RAM.
Based on an experiment, a map<int,int> with 40 entries takes 1648 bytes
whereas a flat_map<int,int> (after shrink_to_fit) takes 344 bytes. So,
this should save around 20M of RAM from that server (and improve memory
locality while we're at it).
Change-Id: I1b7eaac3481672c69709009b6eacc2008027d4cd
Reviewed-on: http://gerrit.cloudera.org:8080/6470
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Reviewed-by: Mike Percy <mp...@apache.org>
Tested-by: Todd Lipcon <to...@apache.org>
---
M src/kudu/tablet/delta_compaction.cc
M src/kudu/tablet/diskrowset.cc
M src/kudu/tablet/rowset_metadata.cc
M src/kudu/tablet/rowset_metadata.h
4 files changed, 21 insertions(+), 9 deletions(-)
Approvals:
Mike Percy: Looks good to me, approved
Adar Dembo: Looks good to me, approved
Todd Lipcon: Verified
--
To view, visit http://gerrit.cloudera.org:8080/6470
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1b7eaac3481672c69709009b6eacc2008027d4cd
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] rowset metadata: use flat map for column->block mapping
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change.
Change subject: rowset_metadata: use flat_map for column->block mapping
......................................................................
Patch Set 3: Verified+1
issue was a known openssl leak that we havn't figured out yet
--
To view, visit http://gerrit.cloudera.org:8080/6470
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1b7eaac3481672c69709009b6eacc2008027d4cd
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No
[kudu-CR] rowset metadata: use flat map for column->block mapping
Posted by "Mike Percy (Code Review)" <ge...@cloudera.org>.
Mike Percy has posted comments on this change.
Change subject: rowset_metadata: use flat_map for column->block mapping
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/6470
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1b7eaac3481672c69709009b6eacc2008027d4cd
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No
[kudu-CR] rowset metadata: use flat map for column->block mapping
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Hello Adar Dembo,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/6470
to look at the new patch set (#2).
Change subject: rowset_metadata: use flat_map for column->block mapping
......................................................................
rowset_metadata: use flat_map for column->block mapping
In a server with around 1T of data, the std::map<> here was taking
around 25MB of RAM.
Based on an experiment, a map<int,int> with 40 entries takes 1648 bytes
whereas a flat_map<int,int> (after shrink_to_fit) takes 344 bytes. So,
this should save around 20M of RAM from that server (and improve memory
locality while we're at it).
Change-Id: I1b7eaac3481672c69709009b6eacc2008027d4cd
---
M src/kudu/tablet/delta_compaction.cc
M src/kudu/tablet/diskrowset.cc
M src/kudu/tablet/rowset_metadata.cc
M src/kudu/tablet/rowset_metadata.h
4 files changed, 14 insertions(+), 6 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/70/6470/2
--
To view, visit http://gerrit.cloudera.org:8080/6470
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I1b7eaac3481672c69709009b6eacc2008027d4cd
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] rowset metadata: use flat map for column->block mapping
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change.
Change subject: rowset_metadata: use flat_map for column->block mapping
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/6470
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1b7eaac3481672c69709009b6eacc2008027d4cd
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No
[kudu-CR] rowset metadata: use flat map for column->block mapping
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change.
Change subject: rowset_metadata: use flat_map for column->block mapping
......................................................................
Patch Set 1:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/6470/1/src/kudu/tablet/rowset_metadata.h
File src/kudu/tablet/rowset_metadata.h:
Line 68: typedef boost::container::flat_map<ColumnId, BlockId> ColumnIdToBlockIdMap;
Nit: add a comment so no one accidentally replaces this with std::map.
--
To view, visit http://gerrit.cloudera.org:8080/6470
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1b7eaac3481672c69709009b6eacc2008027d4cd
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: Yes