Search

3.5. Tuning the Server JVM

download PDF
By default, the JBoss ON server runs with a modest allocated heap size and a configured thread limit that parallels the *nix system limit (1024). However, if the JBoss ON server is running on the same system as other resource-intensive applications such as PostgreSQL, then the JVM needs to be tuned to ensure that the JBoss ON server has adequate system resources. Otherwise, the server can encounter out of memory errors.
When tuning the server JVM, increase the heap size and increase the system thread limit to a high enough value that any memory errors are resolved while still leaving sufficient system resources for other applications.
  1. As root, increase the user thread limit for the system.
    [root@server ~]# ulimit -u 4096
  2. Open the rhq-server-env.sh script to set the new JVM settings.
    [root@server ~]# vim serverRoot/jon-server-3.3.0.GA/bin/rhq-server-env.sh
  3. Change the Java options to increase the heap size, -Xms for the minimum heap and -Xmx for the maximum. For example:
    RHQ_SERVER_JAVA_OPTS="-Xms512M -Xmx1024M -XX:MaxPermSize=128M -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true"
  4. Restart the server to load the new heap settings.
    [root@server ~]# serverRoot/jon-server-3.3.0.GA/bin/rhqctl start --server
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.