feat: change jvm flags order
This commit is contained in:
parent
b08ba3853f
commit
5ae23c931a
2 changed files with 23 additions and 12 deletions
|
|
@ -131,15 +131,6 @@ impl ServerCommand {
|
|||
"-XX:+UnlockExperimentalVMOptions",
|
||||
"-XX:+DisableExplicitGC",
|
||||
"-XX:+AlwaysPreTouch",
|
||||
"-XX:G1HeapWastePercent=5",
|
||||
"-XX:G1MixedGCCountTarget=4",
|
||||
"-XX:G1MixedGCLiveThresholdPercent=90",
|
||||
"-XX:G1RSetUpdatingPauseTimePercent=5",
|
||||
"-XX:SurvivorRatio=32",
|
||||
"-XX:+PerfDisableSharedMem",
|
||||
"-XX:MaxTenuringThreshold=1",
|
||||
"-Dusing.aikars.flags=https://mcflags.emc.gs",
|
||||
"-Daikars.new.flags=true",
|
||||
]);
|
||||
|
||||
if self.xms > 12 * 1024 {
|
||||
|
|
@ -148,18 +139,34 @@ impl ServerCommand {
|
|||
"-XX:G1MaxNewSizePercent=50",
|
||||
"-XX:G1HeapRegionSize=16M",
|
||||
"-XX:G1ReservePercent=15",
|
||||
"-XX:InitiatingHeapOccupancyPercent=20",
|
||||
]);
|
||||
} else {
|
||||
cmd.args([
|
||||
"-XX:G1NewSizePercent=30",
|
||||
"-XX:G1MaxNewSizePercent=40",
|
||||
"-XX:G1HeapRegionSize=8M",
|
||||
"-XX:G1ReservePercent=15",
|
||||
"-XX:InitiatingHeapOccupancyPercent=15",
|
||||
"-XX:G1ReservePercent=20",
|
||||
]);
|
||||
}
|
||||
|
||||
cmd.args(["-XX:G1HeapWastePercent=5", "-XX:G1MixedGCCountTarget=4"]);
|
||||
|
||||
if self.xms > 12 * 1024 {
|
||||
cmd.args(["-XX:InitiatingHeapOccupancyPercent=20"]);
|
||||
} else {
|
||||
cmd.args(["-XX:InitiatingHeapOccupancyPercent=15"]);
|
||||
}
|
||||
|
||||
cmd.args([
|
||||
"-XX:G1MixedGCLiveThresholdPercent=90",
|
||||
"-XX:G1RSetUpdatingPauseTimePercent=5",
|
||||
"-XX:SurvivorRatio=32",
|
||||
"-XX:+PerfDisableSharedMem",
|
||||
"-XX:MaxTenuringThreshold=1",
|
||||
"-Dusing.aikars.flags=https://mcflags.emc.gs",
|
||||
"-Daikars.new.flags=true",
|
||||
]);
|
||||
|
||||
cmd.current_dir(&self.config_dir)
|
||||
.arg("-jar")
|
||||
.arg(&self.jar)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue