feat: change jvm flags order

incremental-backups
Jef Roosens 2023-06-13 13:00:42 +02:00
parent b08ba3853f
commit 5ae23c931a
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
2 changed files with 23 additions and 12 deletions

View File

@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* `--dry` flag to inspect command that will be run * `--dry` flag to inspect command that will be run
### Changed
* JVM flags now narrowely follow Aikar's specifications
## [0.2.0](https://git.rustybever.be/Chewing_Bever/alex/src/tag/0.2.0) ## [0.2.0](https://git.rustybever.be/Chewing_Bever/alex/src/tag/0.2.0)
### Added ### Added

View File

@ -131,15 +131,6 @@ impl ServerCommand {
"-XX:+UnlockExperimentalVMOptions", "-XX:+UnlockExperimentalVMOptions",
"-XX:+DisableExplicitGC", "-XX:+DisableExplicitGC",
"-XX:+AlwaysPreTouch", "-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 { if self.xms > 12 * 1024 {
@ -148,18 +139,34 @@ impl ServerCommand {
"-XX:G1MaxNewSizePercent=50", "-XX:G1MaxNewSizePercent=50",
"-XX:G1HeapRegionSize=16M", "-XX:G1HeapRegionSize=16M",
"-XX:G1ReservePercent=15", "-XX:G1ReservePercent=15",
"-XX:InitiatingHeapOccupancyPercent=20",
]); ]);
} else { } else {
cmd.args([ cmd.args([
"-XX:G1NewSizePercent=30", "-XX:G1NewSizePercent=30",
"-XX:G1MaxNewSizePercent=40", "-XX:G1MaxNewSizePercent=40",
"-XX:G1HeapRegionSize=8M", "-XX:G1HeapRegionSize=8M",
"-XX:G1ReservePercent=15", "-XX:G1ReservePercent=20",
"-XX:InitiatingHeapOccupancyPercent=15",
]); ]);
} }
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) cmd.current_dir(&self.config_dir)
.arg("-jar") .arg("-jar")
.arg(&self.jar) .arg(&self.jar)