Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@slievrly
Copy link
Member

@slievrly slievrly commented Feb 8, 2023

Signed-off-by: slievrly [email protected]

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

fix G1 jvm parameter in jdk8

Ⅱ. Does this pull request fix one issue?

fix #5317

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

JAVA_OPT="${JAVA_OPT} -Xlog:gc=trace:file=${BASEDIR}/logs/seata_gc.log:time,tags:filecount=10,filesize=10M"
else
JAVA_OPT="${JAVA_OPT} -Xloggc:${BASEDIR}/logs/seata_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -XX:+UseG1GC"
JAVA_OPT="${JAVA_OPT} -Xloggc:${BASEDIR}/logs/seata_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why jdk8 g1 need UnlockExperimentalVMOptions parameter

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

G1 is a laboratory feature for some jdk8, especially for lower versions and arm64 platforms.

Copy link
Contributor

@l81893521 l81893521 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@slievrly slievrly merged commit e2ff0ee into apache:develop Feb 9, 2023
@funky-eyes
Copy link
Contributor

https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/g1_gc_tuning.html
It looks like only some of the parameters need UnlockExperimentalVMOptions
I use lower jdk 275 on the arm platform and did not find this problem

l81893521 pushed a commit to l81893521/seata that referenced this pull request Mar 28, 2023
@wangliang181230 wangliang181230 added this to the 1.7.0 milestone Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants