impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-5073: Use mmap instead of malloc for buffer pool
Date Fri, 31 Mar 2017 18:10:25 GMT
Tim Armstrong has uploaded a new patch set (#2).

Change subject: IMPALA-5073: Use mmap instead of malloc for buffer pool

IMPALA-5073: Use mmap instead of malloc for buffer pool

Allocate with mmap instead of TCMalloc to give more control over memory
usage. Also allocate huge pages when possible to reduce TLB pressure.

Adds additional memory metrics, since we previously relied on the
assumption that all memory was allocated through TCMalloc. and track the total across
the buffer pool and TCMalloc. When the buffer pool is not present,
they just report the TCMalloc values.

ASAN still uses malloc() because it doesn't instrument mmap().

Added some unit tests to test edge cases. Many pre-existing tests also
exercise the modified code.

Change-Id: Ifbc748f74adcbbdcfa45f3ec7df98284925acbd6
M be/src/catalog/
M be/src/runtime/bufferpool/
M be/src/runtime/bufferpool/buffer-allocator.h
M be/src/runtime/bufferpool/
M be/src/runtime/bufferpool/buffer-pool.h
M be/src/runtime/bufferpool/
M be/src/runtime/bufferpool/reservation-tracker.h
M be/src/runtime/bufferpool/
M be/src/runtime/bufferpool/system-allocator.h
M be/src/runtime/
M be/src/statestore/
M be/src/util/asan.h
M be/src/util/
M be/src/util/memory-metrics.h
M be/src/util/
M be/src/util/metrics.h
M common/thrift/
M common/thrift/metrics.json
18 files changed, 355 insertions(+), 34 deletions(-)

  git pull ssh:// refs/changes/74/6474/2
To view, visit
To unsubscribe, visit

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifbc748f74adcbbdcfa45f3ec7df98284925acbd6
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <>

View raw message