Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Remove fixed young generation heap space of instance #3789

Conversation

thinker0
Copy link
Member

@thinker0 thinker0 commented Mar 10, 2022

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/

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.

Remove fixed young generation heap space of JVM instance

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.

Fix TestCase

Clean code
@thinker0 thinker0 force-pushed the feature/remove-fixed-young-generation-heap-space-of-instance branch from bc6c21d to f9514ad Compare March 10, 2022 04:39
@nicknezis nicknezis merged commit b12a396 into apache:master Mar 21, 2022
@thinker0 thinker0 deleted the feature/remove-fixed-young-generation-heap-space-of-instance branch March 21, 2022 13:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants