Joe McDonnell has submitted this change and it was merged. ( https://gerrit.cloudera.org/25218 )
Change subject: IMPALA-15602/IMPALA-15824: Default to Google TCMalloc ...................................................................... IMPALA-15602/IMPALA-15824: Default to Google TCMalloc Impala currently builds against gperftools and configures it to use its aggressive memory decommit mode. This combination minimizes memory overhead, but at a significant performance cost. Some workloads have allocation patterns that bypass the thread cache and cause significant lock contention. We have been benchmarking two alternatives introduced in previous changes: - IMPALA-14900/IMPALA-15316: Turn off aggressive decommit with gperftools - IMPALA-14702: Google TCMalloc Both provide substantial performance gains on a variety of workloads. The differences between the two are not as stark, but there is a slight advantage for Google TCMalloc on average. This switches the default for IMPALA_MALLOC_IMPL to googletcmalloc. Since Google TCMalloc conflicts with glibc's RSEQ usage, this adds GLIBC_TUNABLES=glibc.pthread.rseq=0 in docker/daemon_entrypoint.sh and package/conf/impala-env.sh to disable glibc's RSEQ usage for Docker images and the OS packages. This changes existing sets for GLIBC_TUNABLES to do an append rather than overwriting. This also improves the error message when it is unable to use the per-CPU mode to note that this is usually about glibc's RSEQ usage. This also updates the AGENTS.md instructions to tell agents to run backend tests with bin/run-jvm-binary.sh, which properly handles the RSEQ settings. Deployments of statestored, catalogd, and admissiond using Docker often have constrained memory. If these daemons exceed their memory limit, they can be evicted. Using gperftools with aggressive memory decommit helps here because it immediately frees unnecessary memory. Since these daemons don't benefit greatly from Google TCMalloc, this preserves the existing behavior by using an impalad binary built against gperftools for those Docker images. Specifically, it adds extra base images that use an impalad built with gperftools, then statestored, catalogd, and admissiond use that base image rather than the regular one. IMPALA-15729 tracks migrating these non-impalad daemons to Google TCMalloc. The Docker CMake build has separate sets of images for Java 17 and Java 21 (see IMPALA-15806), so each set gets its own regular and gperftools base images. Since Clang has been upgraded, the logic to avoid Google TCMalloc for Clang builds is no longer necessary, so this removes that logic. Google TCMalloc uses Abseil to take a stack trace when it samples allocations. ARM builds with Google TCMalloc were seeing an intermittent crash in Abseil's stack trace logic (IMPALA-15824). This bumps the toolchain to update to Abseil 20260817.0, which fixes the boundary checking in the ARM stack trace implementation. When diagnosing the issue, use also found undefined behavior with the pointer difference calculation in the ARM stack trace code. This applies that change as an additional patch, but it is not necessary to fix the original issue. Testing: - Ran core jobs on a variety of platforms (Redhat 8 x86_64, Redhat 9 x86_64, Redhat 9 ARM) - Ran exhaustive release job on Redhat 9 x86_64 - Ran EE_TESTS in a loop on Redhat 9 ARM for 20 hours (for both debug core tests and release exhaustive tests) Change-Id: I019f1e22c0055f48534000dbb4a23c6808dc73a7 Assisted-by: Claude Sonnet 5.5 (Claude Code) Reviewed-on: https://gerrit.cloudera.org/25218 Tested-by: Impala Public Jenkins <[email protected]> Reviewed-by: Michael Smith <[email protected]> Reviewed-by: Csaba Ringhofer <[email protected]> --- M AGENTS.md M be/CMakeLists.txt M be/src/service/CMakeLists.txt M be/src/util/CMakeLists.txt M be/src/util/malloc-util-googletcmalloc.h M bin/impala-config.sh M bin/run-binary.sh M bin/run-jvm-binary.sh M docker/CMakeLists.txt M docker/daemon_entrypoint.sh M docker/impala_base/Dockerfile M docker/setup_build_context.py M package/conf/impala-env.sh 13 files changed, 182 insertions(+), 77 deletions(-) Approvals: Impala Public Jenkins: Verified Michael Smith: Looks good to me, but someone else must approve Csaba Ringhofer: Looks good to me, approved -- To view, visit https://gerrit.cloudera.org/25218 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I019f1e22c0055f48534000dbb4a23c6808dc73a7 Gerrit-Change-Number: 25218 Gerrit-PatchSet: 9 Gerrit-Owner: Joe McDonnell <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]>
