arvindram03 commented on code in PR #28442:
URL: https://github.com/apache/beam/pull/28442#discussion_r1327826967
##########
sdks/java/container/boot.go:
##########
@@ -266,9 +267,12 @@ 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.
-func heapSizeLimit(info *fnpb.ProvisionInfo) uint64 {
- if size, err := syscallx.PhysicalMemorySize(); err == nil {
+// underutilizing the machine. if set_recommended_max_xmx experiment is
enabled, sets xmx
+// to 32G
+func heapSizeLimit(info *fnpb.ProvisionInfo, setRecommendedMaxXmx bool) uint64
{
+ if setRecommendedMaxXmx {
+ return 32 << 30
Review Comment:
We do not want to expose the plug too much with this change as well. Which
later becomes hard to control. In future, might be a generic way to control all
the jvm args which will be covering this as well.
--
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]