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

Technote (FAQ)


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.



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

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

WebSphere Application Server
General

Software version:

8.5

Operating system(s):

AIX, Linux, Solaris, Windows

Reference #:

1596474

Modified date:

2012-06-15

Translate my page

Machine Translation

Content navigation