You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by GitBox <gi...@apache.org> on 2022/03/10 02:15:24 UTC

[GitHub] [incubator-heron] thinker0 opened a new pull request #3789: Remove fixed young generation heap space of instance

thinker0 opened a new pull request #3789:
URL: https://github.com/apache/incubator-heron/pull/3789


   It seems that it is not suitable for JVM 11 or higher to statically allocate 50% heap.
   
   Ref: 
   ```
   For Java 11 and above
   The Xmx value is 25% of the available memory with a maximum of 25 GB. However, where there is 2 GB or less of physical memory, the value set is 50% of available memory with a minimum value of 16 MB and a maximum value of 512 MB.
   For Java 8
   The Xmx value is half the available memory with a minimum of 16 MB and a maximum of 512 MB.
   ```
   
   https://blog.openj9.org/2020/04/30/default-java-maximum-heap-size-is-changed-for-java-8/
   
   


-- 
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: commits-unsubscribe@heron.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-heron] thinker0 commented on a change in pull request #3789: Remove fixed young generation heap space of instance

Posted by GitBox <gi...@apache.org>.
thinker0 commented on a change in pull request #3789:
URL: https://github.com/apache/incubator-heron/pull/3789#discussion_r825379781



##########
File path: heron/executor/src/python/heron_executor.py
##########
@@ -610,11 +610,20 @@ def _get_jvm_instance_options(self, instance_id, component_name, remote_debugger
             java_version.startswith("1.6") or \
             java_version.startswith("1.5"):
       java_metasize_param = 'PermSize'
+    xmn_param = '-Xmn%dM' % xmn_size
+    if self._get_java_major_version() >= 11:
+        # For Java 11 and above.
+        # The Xmx value is 25% of the available memory with a maximum of 25 GB.

Review comment:
       Want to delete -Xmn.
   
   If there is this setting, YoungHeap area is too limited, so if -Xmx4g, only 2g is used.




-- 
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: commits-unsubscribe@heron.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-heron] thinker0 commented on a change in pull request #3789: Remove fixed young generation heap space of instance

Posted by GitBox <gi...@apache.org>.
thinker0 commented on a change in pull request #3789:
URL: https://github.com/apache/incubator-heron/pull/3789#discussion_r825380211



##########
File path: heron/executor/src/python/heron_executor.py
##########
@@ -610,11 +610,20 @@ def _get_jvm_instance_options(self, instance_id, component_name, remote_debugger
             java_version.startswith("1.6") or \
             java_version.startswith("1.5"):
       java_metasize_param = 'PermSize'
+    xmn_param = '-Xmn%dM' % xmn_size
+    if self._get_java_major_version() >= 11:
+        # For Java 11 and above.
+        # The Xmx value is 25% of the available memory with a maximum of 25 GB.

Review comment:
       Before deletion -Xmx=5.5g Used 2.25g
   After deletion -Xmx=5.5g Used 4.9g
   
   <img width="821" alt="image" src="https://user-images.githubusercontent.com/357785/158043683-e3952566-919a-422f-8a10-fdfc9cde2775.png">
   




-- 
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: commits-unsubscribe@heron.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-heron] thinker0 commented on a change in pull request #3789: Remove fixed young generation heap space of instance

Posted by GitBox <gi...@apache.org>.
thinker0 commented on a change in pull request #3789:
URL: https://github.com/apache/incubator-heron/pull/3789#discussion_r825380211



##########
File path: heron/executor/src/python/heron_executor.py
##########
@@ -610,11 +610,20 @@ def _get_jvm_instance_options(self, instance_id, component_name, remote_debugger
             java_version.startswith("1.6") or \
             java_version.startswith("1.5"):
       java_metasize_param = 'PermSize'
+    xmn_param = '-Xmn%dM' % xmn_size
+    if self._get_java_major_version() >= 11:
+        # For Java 11 and above.
+        # The Xmx value is 25% of the available memory with a maximum of 25 GB.

Review comment:
       `-Xmn` Before deletion: -Xmx=5.5g Used 2.25g
   `-Xmn` After deletion: -Xmx=5.5g Used 4.9g
   
   <img width="821" alt="image" src="https://user-images.githubusercontent.com/357785/158043683-e3952566-919a-422f-8a10-fdfc9cde2775.png">
   




-- 
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: commits-unsubscribe@heron.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-heron] nicknezis merged pull request #3789: Remove fixed young generation heap space of instance

Posted by GitBox <gi...@apache.org>.
nicknezis merged pull request #3789:
URL: https://github.com/apache/incubator-heron/pull/3789


   


-- 
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: commits-unsubscribe@heron.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-heron] nicknezis commented on a change in pull request #3789: Remove fixed young generation heap space of instance

Posted by GitBox <gi...@apache.org>.
nicknezis commented on a change in pull request #3789:
URL: https://github.com/apache/incubator-heron/pull/3789#discussion_r824908430



##########
File path: heron/executor/src/python/heron_executor.py
##########
@@ -610,11 +610,20 @@ def _get_jvm_instance_options(self, instance_id, component_name, remote_debugger
             java_version.startswith("1.6") or \
             java_version.startswith("1.5"):
       java_metasize_param = 'PermSize'
+    xmn_param = '-Xmn%dM' % xmn_size
+    if self._get_java_major_version() >= 11:
+        # For Java 11 and above.
+        # The Xmx value is 25% of the available memory with a maximum of 25 GB.

Review comment:
       This information only applies to the Xmx default value. But it seems we are always setting Xmx on line 624. So perhaps this comment isn't needed? Or is it related to the Xmn change this PR introduces?




-- 
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: commits-unsubscribe@heron.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-heron] thinker0 commented on a change in pull request #3789: Remove fixed young generation heap space of instance

Posted by GitBox <gi...@apache.org>.
thinker0 commented on a change in pull request #3789:
URL: https://github.com/apache/incubator-heron/pull/3789#discussion_r825379781



##########
File path: heron/executor/src/python/heron_executor.py
##########
@@ -610,11 +610,20 @@ def _get_jvm_instance_options(self, instance_id, component_name, remote_debugger
             java_version.startswith("1.6") or \
             java_version.startswith("1.5"):
       java_metasize_param = 'PermSize'
+    xmn_param = '-Xmn%dM' % xmn_size
+    if self._get_java_major_version() >= 11:
+        # For Java 11 and above.
+        # The Xmx value is 25% of the available memory with a maximum of 25 GB.

Review comment:
       Want to delete `-Xmn`.
   
   If there is this setting, YoungHeap area is too limited, so if `-Xmx4g`, only `2g` is used.




-- 
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: commits-unsubscribe@heron.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org