This tutorial will illustrate how to configure JVM Settings in a WildFly / JBoss EAP Domain

The JVM settings of WildFly / JBoss EAP Domain Domain server instances can be configured at different levels: At Host Controller level, at Server Group level and on individual Server level.

A default jvm configuration is defined on each Host Controller:

        <jvm name="default">
            <heap size="64m" max-size="256m"/>
                <option value="-server"/>
                <option value="-XX:MetaspaceSize=96m"/>
                <option value="-XX:MaxMetaspaceSize=256m"/>
                <option value="--add-exports=java.base/"/>

The attribute size controls the the initial heap size allocated by the JVM, while the max-size controls the the maximum heap size that can be allocated by the JVM.
You can control -XX JVM options (such as Garbage Collection Algorithms) through the option element of jvm-options.

The Host Controller JVM settings for the “default” jvm can be changed by setting any of its attributes


You can also create a new JVM definition for your Host Controller by using the add operation, which allows to specify the initial attribute of the JVM:

 /host=host1/jvm=large_jvm:add(heap-size=2048m, max-heap-size=2048m, max-permgen-size=512m, stack-size=1024k, jvm-options=["-XX:-UseParallelGC"])

Overriding the Host Controller JVM settings

The Host Controller JVM settings can be overridden if you have JVM settings defined at Server Group level as in this example:

<server-group name="main-server-group" profile="full">
            <jvm name="default">
                <heap size="1000m" max-size="1000m"/>
            <socket-binding-group ref="full-sockets"/>

Here is, for example, how to define the Initial Heap size in the main-server-group:


Here is on the other hand how you can set the maximum heap size in the same Server Group:


This is the result on your configuration of the above changes:

<server-group name="main-server-group" profile="full">
            <jvm name="default">
                <heap size="512" max-size="1512"/>
            <socket-binding-group ref="full-sockets"/>

The Server Group configuration can in turn be overridden at Server level. As an example, we will see how to apply specific JVM settings for the Server “server-one”.

First of all, let’s check if the Server already has a custom jvm setting:

"outcome" => "success",
"result" => {}

As confirmed by its configuration, the Server server-one has no custom JVM settings:

        <server name="server-one" group="main-server-group"/>

Therefore you need to add the JVM settings, which allows to set the values for it:


If the JVM attribute is already defined for a server, then you can simply use the write-attribute operation:


What is the purpose of the JVM settings contained in domain.conf? These settings do not affect the individual Servers of the Domain but just the Host Controller JVM Process.


Related articles available on

JBoss MBeans POJO

JMX MBean services are the core building blocks of the JBoss Appl

How to a dump of JNDI tree with JMX console ?

#2 JBoss Howto. This is the recipe of the day

How to configure JBoss to bind to a different IP ?

  If you want to change the jboss.bind.address property use the 

How to shut down JBoss from remote ?

JBoss recipe of the day

How to create multiple instances of an Mbean?

  Supposing you need two instances of an MBean, let's say one fo

JBoss classloader issues

By default JBoss (prior to version 3.2) uses a flat class loading