Hello Adar Dembo, Kudu Jenkins, I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/6466 to look at the new patch set (#2). Change subject: cfile_set: reduce memory usage of reader map ...................................................................... cfile_set: reduce memory usage of reader map We previously used an unordered_map<int, shared_ptr<...>>. This patch changes to using boost's flat_map container, which is based on sorted entries in a vector. This means we get one contiguous memory location vs a bunch of smaller per-item allocations in the separate-chained hashtable. Additionally switches to unique_ptr which avoids an extra 16-byte control structure per CFileReader. It's hard to measure the exact win here, but I wrote a little test program which compared inserting 40 entries into the two types of maps, leaking the maps, and looking at the LeakSanitizer reports. With the old map and shared_ptr, it cost 2832 bytes, and with the flat_map and unique_ptr, it only took 824 bytes. So, we saved about 50 bytes per entry. Extrapolating this out to a server with 600k cfiles open, we'll save around 28MB. Not huge, but worth doing. Change-Id: I3812861a11b00e149ca47b090447bc918c465ad4 --- M src/kudu/tablet/cfile_set.cc M src/kudu/tablet/cfile_set.h 2 files changed, 9 insertions(+), 6 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/66/6466/2 -- To view, visit http://gerrit.cloudera.org:8080/6466 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3812861a11b00e149ca47b090447bc918c465ad4 Gerrit-PatchSet: 2 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Todd Lipcon <t...@apache.org> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <t...@apache.org>