Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

JVM Tuning for JBoss EAP

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.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Beginner
Duration
Clock icon 15m
Published
Clock icon Jan 24, 2020

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Check for Existing JVM Settings

    See if there are any existing Java settings to consider:

    echo $JAVA_OPTS
    

    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.

  2. Challenge

    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

  3. Challenge

    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.

  4. Challenge

    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
    

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

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.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans