-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce the default min heap size and remove the default max heap size
For historical reasons we were setting the initial heap size to the same value as the max heap size: 4GiB. However, based on experimentation, our memory pool usage is around 512MB for an idle server. The cost dynamics of cloud make it more important to set an appropriate initial heap size and memory management in the JVM has gotten better over time. As for the max heap size, OpenJ9 has intelligent defaults when running within a container, and so we should use those instead of guessing at a default of our own: https://www.eclipse.org/openj9/docs/xxusecontainersupport Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
- Loading branch information
Showing
3 changed files
with
9 additions
and
15 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
fhir-server/liberty-config/configDropins/defaults/jvm.options
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Set a fixed, higher than default, initial heap size that could serve a moderate workload | ||
-Xms768M |
11 changes: 6 additions & 5 deletions
11
fhir-server/liberty-config/configDropins/disabled/jvm.options
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
# Reduced heap size for constrained environments | ||
# Set a fixed max heap size | ||
-Xmx3072M | ||
|
||
# Initial heap size (same as max so no reallocations will occur) | ||
-Xms3072M | ||
# Turn on verbose classloading | ||
-verbose:class | ||
|
||
# Maximum heap size | ||
-Xmx3072M | ||
# Turn on verbose garbage collection | ||
-verbose:gc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters