JVM parameter configurations
Updated at:
Recommended JVM memory parameter values for different instance specifications.
Keep total JVM memory (heap, metaspace, off-heap, and code cache) within 80% of available system memory.
The following values are recommendations. Adjust based on your stress test results.
|
JVM parameter |
Description |
1C 2G |
2C 4G |
4C 8G |
8C 16G |
|
-Xms |
Initial heap size |
1G |
2560M |
4G |
10G |
|
-Xmx |
Maximum heap size |
1G |
2560M |
4G |
10G |
|
-Xmn |
Young generation size |
500M |
1200M |
2G |
5G |
|
-Xss |
Thread stack size. JDK 8 default: 1M |
1M |
1M |
1M |
1M |
|
-XX:MetaspaceSize |
Initial metaspace size |
128M |
256M |
384M |
512M |
|
-XX:MaxMetaspaceSize |
Maximum metaspace size |
128M |
256M |
384M |
512M |
|
-XX:MaxDirectMemorySize |
Maximum off-heap memory size |
256M |
256M |
1G |
1G |
|
-XX:ReservedCodeCacheSize |
Code cache size |
64M |
128M |
256M |
256M |
Is this page helpful?