JVM Tuning for JBoss EAP

15 minutes
  • 4 Learning Objectives

About this Hands-on Lab

JBoss Enterprise Application Platform leverages a Java Virtual Machine to run its standalone server and host its applications. As we deploy our applications and leverage JBoss, we want to ensure our apps have optimal performance, and a portion of that lies in optimizing the JVM itself. In this hands-on lab, we explore a number of Java options we can set to ensure our JVM it running the best it can.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Check for Existing JVM Settings

See if there are any existing Java settings to consider:


We can now set our options by using export on the CLI, or via the console. Let’s switch to the console by going to PUBLICIP:9990 and logging in as the admin user with the password pinehead.

Set a Fixed Heap Size
  1. Navigate to the Configuration section of the HAL Management Console, then select System Properties.

  2. Click Add on the right-hand side of the table.

  3. Set the Name filed to JAVA_OPTS and the Value field to -Xms1024M -Xmx1024M.

  4. Click Add

Enable the G1 Garbage Collector and Aggressive Optimizations

The additional options we need also need to be set under the JAVA_OPTS variable. Select JAVA_OPTS from the table and click Edit. Enable both the garbage collection and aggressive optimizations. The full expression should be:

-Xms1024M -Xmx1024M -XX:+UseG1GC -XX:+AggressiveOpts

Select Save.

Confirm the Changes
  1. Back on the CLI, open the standalone configuration file and search for JAVA_OPTS to confirm the changes:

    vim /opt/jboss-eap/standalone/configuration/standalone.xml

    Exit the CLI with exit.

  1. Restart the server:

    sudo systemctl restart jboss-eap-rhel

Additional Resources

You are the DevOps administrator responsible for setting up any JBoss EAP standalone servers in use. Having recently spun up a new standalone instance, you want to tune the Java Virtual Machine further to enhance performance. Set the initial and maximum heap size to 1024MB, turn on the G1 garbage collector, and enable aggressive optimizations.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!