Tim Armstrong has posted comments on this change. Change subject: IMPALA-5073: Use mmap() instead of malloc() for buffer pool ......................................................................
Patch Set 7: (1 comment) http://gerrit.cloudera.org:8080/#/c/6474/7/be/src/runtime/bufferpool/system-allocator.cc File be/src/runtime/bufferpool/system-allocator.cc: Line 81: munmap(mem, fixup); > does this path occur normally? how expensive are these 2 extra munmap()s? h Yeah I couldn't find any way to mmap aligned memory (aside from actually specifying the base address). I did some basic experiments when I added this and it looks like in the common case the memory returned is aligned (because I think it typically returns an address after the last mapped region). So generally we'd do only one unmap(). We could try to avoid the extra unmap() by optimistically mapping only the required amount, hoping it's aligned, then falling back to this logic. But that seemed a bit complicated. I think in general we're hoping that we don't call into the system *too* often. This only adds a constant factor. -- To view, visit http://gerrit.cloudera.org:8080/6474 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifbc748f74adcbbdcfa45f3ec7df98284925acbd6 Gerrit-PatchSet: 7 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Tim Armstrong <[email protected]> Gerrit-Reviewer: Dan Hecht <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-HasComments: Yes
