IBM Support

Setting generic JVM arguments in the WebSphere Application Server V8.5 Liberty profile

Question & Answer


Question

This technote explains how and where you can set generic JVM arguments for the WebSphere Application Server V8.5 Liberty profile.

Answer

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.

  1. Create a text file named jvm.options.

  2. Insert your generic JVM options, one per line, into this file.

  3. 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:

      ${server.config.dir}/jvm.options

    • To apply these changes to all Liberty JVMs, save jvm.options at:

      ${wlp.install.dir}/etc/jvm.options

      This will take effect for all JVMs that do not have a locally defined jvm.options file.

  4. Restart the server to enable changes. You can verify that the new settings have been picked up after the restart by following the steps at the below link to generate a javacore.

    http://www-01.ibm.com/support/docview.wss?uid=swg21597830

    You may then inspect the javacore to ensure the changes were successful.



Common settings
  • 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

    For example:

    -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:

    -verbose:gc

    If using a Solaris JDK, add the following additional parameters to ensure full GC details are printed:

    -XX:+PrintGCDetails
    -XX:+PrintGCTimeStamps
    -XX:+PrintHeapAtGC


    Verbose GC output will be logged to the following location by default:

    <wlp.install.directory>/usr/servers/<serverName>/logs/console.log



Liberty profile default settings

By default, the WebSphere Application Server V8.5 Liberty profile is configured with the following JVM settings:

-Xms4m
-Xmx488m
-XX:MaxPermSize=256m (Solaris only)

These are overridden by specifying values in the jvm.options file

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"General","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"8.5","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21596474