From f254d97dd1ec41edf434cdd19ea73b5dbd805cb1 Mon Sep 17 00:00:00 2001 From: arvindram03 Date: Mon, 18 Sep 2023 11:35:24 -0700 Subject: [PATCH] Adding comment to reason why 32G is recomemnded value --- sdks/java/container/boot.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdks/java/container/boot.go b/sdks/java/container/boot.go index c32395dd3f46..f7fd7437c88a 100644 --- a/sdks/java/container/boot.go +++ b/sdks/java/container/boot.go @@ -267,8 +267,10 @@ func makePipelineOptionsFile(options string) error { // it returns 70% of the physical memory on the machine. If it cannot determine // that value, it returns 1GB. This is an imperfect heuristic. It aims to // ensure there is memory for non-heap use and other overhead, while also not -// underutilizing the machine. if set_recommended_max_xmx experiment is enabled, sets xmx -// to 32G +// underutilizing the machine. if set_recommended_max_xmx experiment is enabled, +// sets xmx to 32G. Under 32G JVM enables CompressedOops. CompressedOops +// utilizes memory more efficiently, and has positive impact on GC performance +// and cache hit rate. func heapSizeLimit(info *fnpb.ProvisionInfo, setRecommendedMaxXmx bool) uint64 { if setRecommendedMaxXmx { return 32 << 30