deniskuzZ opened a new pull request, #6874:
URL: https://github.com/apache/hive/pull/6874

   ### What changes were proposed in this pull request?
   `run_tezam` in `packaging/src/docker/entrypoint.sh` defaults 
`MALLOC_ARENA_MAX` to 4 and exports it before it starts `DAGAppMaster`; a value 
already set in the container's environment is kept.
   
   ### Why are the changes needed?
   The other services of the image already run with it: HiveServer2 and the 
metastore start through `bin/hive` -> `hadoop jar`, whose `hadoop-config.sh` 
(`hadoop_os_tricks`) exports `MALLOC_ARENA_MAX=4`, and LLAP starts through 
`runLlapDaemon.sh`, which exports it. The Tez AM starts with plain `java`, so 
glibc allows it 8 malloc arenas per core.
   
   On Kubernetes (24 LLAP daemons, TPC-DS 10 TB on S3) the AM container (6144M, 
`-Xmx4G`) was OOMKilled with the heap 20% live and 1568 threads: memory outside 
the heap filled the container.
   
   ### Does this PR introduce _any_ user-facing change?
   The Tez AM container runs with `MALLOC_ARENA_MAX=4` unless the deployment 
sets another value.
   
   ### How was this patch tested?
   `run_tezam` extracted from the entrypoint and run under bash 5 with a stub 
`java` that prints its environment: before the change `MALLOC_ARENA_MAX` is 
unset; after it is `4`, and a preset `2` stays `2`.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to