View Source

WAS THIS PAGE HELPFUL? {html}<a href="mailto:training@gwos.com?subject=How to Dual JVM Configuration">Leave Feedback</a>{html}

h6. Overview

With the increased availability of large systems with typically 8 or more processors, 16 GB of memory and terabytes of disk space, it becomes necessary to consider re-configuring GroundWork Monitor Enterprise to take advantage of these resources in large deployments. GroundWork Monitor Enterprise was developed and optimized for dual core 4-8 GB systems and the usual optimizations (threadpools, heap space allocations). As such, it won't take full advantage of a large system with the default deployment.

This document describes the steps necessary to reconfigure GroundWork Monitor Enterprise for large systems. This configuration can be used with systems that have:
* 16 GB or more of memory
* 8 or more processor cores (for bare metal installations - VMWare instances require further consideration - 2 cores will offer better performance)
* The GroundWork disk space requirements for this type of installation do not change significantly

{warning}This configuration requires version 7.1.1 or 7.1.0 and newer. Please do not apply any of these changes to previous releases. It will probably break and won't be supported.{warning}

h6. How It Works

We separate the UI and the backend into separate JVMs, each of which can be given several gigabytes of RAM. Some service ports change so that the two JVMs have their own places to do business.

h6. Requirements

# GroundWork Monitor 7.1.1 or 7.1.0 installation successfully operating.
# Message preprocessing setup according to the Bookshelf page&nbsp;[Preprocessing Log Messages|DOC71:Configuring Event Console#PreprocessingLogMessages]. We suggest the pre-processing of LogMessages by Operation Status for the default views. This reduces load significantly on the PostgreSQL database instance.
# The hardware requirements for this capability are the same or better as described in the overview.
# You need {{nagios}} user privilege.

h6. Installation Steps

Please reserve at least an hour downtime for performing this installation and have all the users logged out of the GroundWork portal.

{warning:title=Before you install}
* During the installation, the GroundWork server will be stopped and started. So you probably want to wait until a maintenance period before making these changes.
* This installer will create a backup of modified files ({{7.1.1.single-jboss.backup.tgz}} or {{7.1.0.single-jboss.backup.tgz}}). Please make a note of this tar ball and save it for future restoration process.
{warning}

To install on a GroundWork server where the single-instance JBoss AS system is deployed, do the following:

* SHMMAX SHMALL Kernel parameters - Possibly edit {{/etc/sysctl.conf}} to allow shared memory to be assigned up to the amount available in the system. Here we show typical entries which work for a system with 16 GB of RAM, allowing up to 1/2 the RAM to be allocated as shared. Use this as a starting point, remembering that allowing the OS to assign 100% of physical RAM as shared memory will likely cause some performance issues.
{noformat}
# Controls the maximum shared segment size, in bytes
kernel.shmmax = 8589934592
# Minimum size of shared memory segment (bytes); one reference says this could be 1, up to a reasonable 256k. We've used 524k without issue, but hey.
# This is noted here because one of the Postgres errors calls it out as a possible issue when a new request is "too small"
kernel.shmmin = 262144
# Controls the maximum number of shared memory segments, in pages (a page is probably 4096 bytes)
kernel.shmall = 2097152
{noformat}
Once this file is edited use the following command to make the changes immediately effective (there are run time methods but we want the changes to be permanent as well as immediate):
{noformat}
sysctl -p
{noformat}

* +If you are running remote PostgreSQL Database+, then ssh to postgresql server and edit:
{noformat}/usr/local/groundwork/postgresql/data/postgresql.conf{noformat}
and change the setting as follows (use 1/4th of your physical memory to determine your {{shared_buffers}}):
{noformat}
max_connections = 160
shared_buffers=4096MB
{noformat}
and restart postgresql:
{noformat}service groundwork restart postgresql{noformat}

* Run the installer script as the {{root}} user (or user with _root sudo_ rights), and the installer will guide you with the available options:
{warning}DO NOT run this script as the {{nagios}} user.{warning}
{noformat}
/usr/local/groundwork/jpp/dual-jboss-installer/install-dual-jboss.sh
{noformat}

{note:title=Configuration Information (after successfully converting to dual JBoss):}
* The Foundation HTTP port is moved from {{8080}} to {{8180}}. Any custom scripts accessing Foundation (via SOAP or REST) via {{localhost:8080}} need to be manually changed to {{localhost:8180}}. If accessing via {{hostname:80}} they should be fine.
* Portal log4j config: {{/usr/local/groundwork/foundation/container/jpp/standalone/configuration/standalone.xml}}
* Portal logs: {{/usr/local/groundwork/foundation/container/jpp/standalone/log/framework.log}}
* Foundation log4j config: {{/usr/local/groundwork/foundation/container/jpp2/standalone/configuration/standalone.xml}}
* Foundation logs: {{/usr/local/groundwork/foundation/container/jpp2/standalone/log/framework.log}}
* JOSSO log4j config: {{/usr/local/groundwork/josso-1.8.4/conf/logging.properties}}
* JOSSO authentication logs: {{/usr/local/groundwork/josso-1.8.4/logs/catalina.out}}
* If you have configured _SSL_ or _LDAP_, it should be working as usual. This installer will not change any of your _SSL or LDAP_ configurations.
{note}

h6. Verification Steps

The following command will now show 3 JVMs running: 2 JBoss instances, and 1 Tomcat instance.
{noformat}
ps -ef | grep java
{noformat}

h6. Uninstall Steps

If you want to revert back to single-instance JBoss AS configuration, go to the folder where you have saved the {{7.1.1.single-jboss.backup.tgz}} or {{7.1.0.single-jboss.backup.tgz}} the file and run the following commands sequentially:

{noformat}
service groundwork stop{noformat}
{note}Adjust the following command if using version {{7.1.0}} replacing {{7.1.1}}.{note}
{noformat}tar -xzvf 7.1.1.single-jboss.backup.tgz -C /{noformat}
{noformat}mv /usr/local/groundwork/foundation/container/jpp2/standalone/deployments/foundation-webapp.war /usr/local/groundwork/foundation/container/jpp/standalone/deployments/{noformat}
{noformat}mv /usr/local/groundwork/foundation/container/jpp2/standalone/deployments/legacy-rest.war /usr/local/groundwork/foundation/container/jpp/standalone/deployments/{noformat}
{noformat}rm -rf /usr/local/groundwork/foundation/container/jpp2{noformat}
{noformat}rm -rf /usr/local/groundwork/jpp2{noformat}
{noformat}sed -i '/foundation-webapp/d' /usr/local/groundwork/nagvis/etc/nagvis.ini.php{noformat}
{noformat}find /usr/local/groundwork/ -name "*.rptdesign" -exec sed -i 's/localhost:8180\/foundation-webapp/localhost:8080\/foundation-webapp/g' {} \;{noformat}
{noformat}service groundwork start
{noformat}