Skip to content

Commit

Permalink
Fix Max Heap estimation detection on Java 11 (#2258)
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Scholz <www@scholzj.com>
  • Loading branch information
scholzj committed Dec 2, 2019
1 parent a86f849 commit ebb63c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docker-images/kafka/scripts/dynamic_resources.sh
Expand Up @@ -4,7 +4,7 @@ function get_heap_size {
FRACTION=$1
MAX=$2
# Get the max heap used by a jvm which used all the ram available to the container
MAX_POSSIBLE_HEAP=$(java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=1 -XshowSettings:vm -version \
MAX_POSSIBLE_HEAP=$(java -XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport -XX:MaxRAMFraction=1 -XshowSettings:vm -version \
|& awk '/Max\. Heap Size \(Estimated\): [0-9KMG]+/{ print $5}' \
| gawk -f to_bytes.gawk)

Expand Down

0 comments on commit ebb63c1

Please sign in to comment.