Question & Answer
This technote explains how and where you can set generic JVM arguments for the WebSphere Application Server V8.5 Liberty profile.
The generic JVM arguments are used to configure and adjust how the JVM executes.
The WebSphere Application Server Liberty profile is pre-configured with minimal settings defined. The following steps will direct you how to define custom generic JVM arguments such as heap settings for a Liberty server.
- Create a text file named jvm.options.
- Insert your generic JVM options, one per line, into this file.
- Depending on your preferences, you might configure a single JVM or all Liberty JVMs with your options file.
- To apply these settings to a single server, save jvm.options at:
- To apply these changes to all Liberty JVMs, save jvm.options at:
This will take effect for all JVMs that do not have a locally defined jvm.options file.
You may then inspect the javacore to ensure the changes were successful.
- Setting the Java heap:
You can specify the minimum and maximum Java heap sizes as follows:
Minimum Java Heap: -Xms<value in MB>m
Maximum Java Heap: -Xmx<value in MB>m
-Xms128m //This would configure a 128MB minimum Java heap
-Xmx512m //This would configure a 512MB maximum Java heap
Note: Heap settings will vary based on the needs of the application and demand of the workload.
- Enabling verbose garbage collection mode:
Add the following to your jvm.options file:
If using a Solaris JDK, add the following additional parameters to ensure full GC details are printed:
Verbose GC output will be logged to the following location by default:
Liberty profile default settings
By default, the WebSphere Application Server V8.5 Liberty profile is configured with the following JVM settings:
-XX:MaxPermSize=256m (Solaris only)
These are overridden by specifying values in the jvm.options file
15 June 2018