Sailesh Mukil has posted comments on this change. Change subject: PREVIEW: Use mmap instead of malloc for buffer pool ......................................................................
Patch Set 1: (2 comments) Seeing as how madvise(addr, len, MADV_HUGEPAGE) causes the kernel to do regular scans of a virtual address space and replace the backed physical regular pages with huge pages once they become available, I would expect in some workloads that this could become a considerable kernel overhead. Just a thought. http://gerrit.cloudera.org:8080/#/c/3046/1/be/src/bufferpool/buffer-allocator.cc File be/src/bufferpool/buffer-allocator.cc: Line 58: int rc = madvise(mem, len, MADV_HUGEPAGE); Do you need to do this if the call on L41 succeeds? Wouldn't it already be backed by huge pages? If so, we can save the cost of a syscall by not calling this. Line 69: int rc = munmap(buffer, len); After unmapping a huge page, would the kernel still treat that virtual address as one that should be backed by a huge page, i.e. for the next time that virtual address is returned on an allocation. If so, then we might face internal fragmentation. -- To view, visit http://gerrit.cloudera.org:8080/3046 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifbc748f74adcbbdcfa45f3ec7df98284925acbd6 Gerrit-PatchSet: 1 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Tim Armstrong <[email protected]> Gerrit-Reviewer: Jim Apple <[email protected]> Gerrit-Reviewer: Sailesh Mukil <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-HasComments: Yes
