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 <[email protected]> Reviewed-by: Mike Percy <[email protected]> Tested-by: Todd Lipcon <[email protected]> --- 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 <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Mike Percy <[email protected]> Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <[email protected]>
