[ 
https://issues.apache.org/jira/browse/FLINK-10799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16679517#comment-16679517
 ] 

ASF GitHub Bot commented on FLINK-10799:
----------------------------------------

tillrohrmann closed pull request #7027: [FLINK-10799][yarn] YARN mode 
JobManager JVM memory args add -XmsXXXm
URL: https://github.com/apache/flink/pull/7027
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
 
b/flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
index c161e227577..de41b75d6ec 100644
--- 
a/flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
+++ 
b/flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
@@ -1610,9 +1610,11 @@ protected ContainerLaunchContext 
setupApplicationMasterContainer(
 
                final  Map<String, String> startCommandValues = new HashMap<>();
                startCommandValues.put("java", "$JAVA_HOME/bin/java");
-               startCommandValues.put("jvmmem", "-Xmx" +
-                       Utils.calculateHeapSize(jobManagerMemoryMb, 
flinkConfiguration) +
-                       "m");
+
+               int heapSize = Utils.calculateHeapSize(jobManagerMemoryMb, 
flinkConfiguration);
+               String jvmHeapMem = String.format("-Xms%sm -Xmx%sm", heapSize, 
heapSize);
+               startCommandValues.put("jvmmem", jvmHeapMem);
+
                startCommandValues.put("jvmopts", javaOpts);
                String logging = "";
 
diff --git 
a/flink-yarn/src/test/java/org/apache/flink/yarn/YarnClusterDescriptorTest.java 
b/flink-yarn/src/test/java/org/apache/flink/yarn/YarnClusterDescriptorTest.java
index f206b6678cf..2726501c9a7 100644
--- 
a/flink-yarn/src/test/java/org/apache/flink/yarn/YarnClusterDescriptorTest.java
+++ 
b/flink-yarn/src/test/java/org/apache/flink/yarn/YarnClusterDescriptorTest.java
@@ -174,7 +174,7 @@ public void testSetupApplicationMasterContainer() {
                        true);
 
                final String java = "$JAVA_HOME/bin/java";
-               final String jvmmem = "-Xmx424m";
+               final String jvmmem = "-Xms424m -Xmx424m";
                final String jvmOpts = "-Djvm"; // if set
                final String jmJvmOpts = "-DjmJvm"; // if set
                final String krb5 = "-Djava.security.krb5.conf=krb5.conf";


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> YARN mode JobManager JVM memory args add -XmsXXXm
> -------------------------------------------------
>
>                 Key: FLINK-10799
>                 URL: https://issues.apache.org/jira/browse/FLINK-10799
>             Project: Flink
>          Issue Type: Improvement
>          Components: YARN
>    Affects Versions: 1.3.3, 1.4.2, 1.5.5, 1.6.2
>            Reporter: xinchun
>            Assignee: xinchun
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.8.0
>
>
> When start JobManager on Yarn mode, only set -Xmx parameter , add -Xms also 
> to avoid high frequency full gc  at start up phase.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to