How to change/add VMware Tanzu GemFire for VMs configurations that are not exposed through GUI
search cancel

How to change/add VMware Tanzu GemFire for VMs configurations that are not exposed through GUI

book

Article ID: 294380

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

How does one change/add VMware Tanzu GemFire for VMs configurations that are not exposed through GUI?

Environment

Product Version: 1.12

Resolution

VMware Tanzu GemFire for VMs does not allow the changing of some types of configurations. However, we can modify existing or add new configuration parameters by tweaking the bpm.yml and/or bpm-script.

There are two types of JAVA parameters used in GemFire. One type is system properties, set with "-D", and the other is JVM parameters.

Note: These steps need to be done for all server VMs in the service instance. Moreover, these changes will be reset as soon as there is any intervention from BOSH, for example "bosh recreate".
 

1. Below are the steps that we need to perform in order to change system properties:

  • ssh into the server VM:
bosh -d <service> ssh <server VM> 
  • Login as the root user
sudo su
  • cd into the following directory:
/var/vcap/jobs/gemfire-server/config
  • Edit the bpm.yml and add/edit the configuration.
vi bpm.yml
Below is an example and a screenshot of the kinds of configurations that can be added or changed:
   - -Dgemfire.security-manager=
  - -Dgemfire.security-enabled-components=server,http,jmx,gateway
  - -Dgemfire.launcher.registerSignalHandlers=true
  - -Dcloudcache-metrics-endpoint-port=7575
  - -Djava.awt.headless=true
  - -Dsun.rmi.dgc.server.gcInterval=9223372036854775806
  - -Dgpfdist-hostname=61d84170-3a38-49f7-bb47-e45257b0f2f5.locator-server.service.service-instance-5bbaeded-8a91-4ed8-a5d1-d80ca56ca039.bosh
  - -Dp2p.backlog=1024
  - -DDistributionManager.MAX_FE_THREADS=2048
  - -DDistributionManager.MAX_PR_THREADS=100
  - org.apache.geode.distributed.ServerLauncher
  - start
  - cacheserver-61d84170-3a38-49f7-bb47-e45257b0f2f5

  - --server-port=40404
  - --max-connections=5000
  - --eviction-heap-percentage=75
  limits:
    open_files: 1048576
  persistent_disk: true
 
image.png
  • Monit restart all the VMs:
monit restart all
  • Then in the server.log (at /var/vcap/sys/log/gemfire-server/gemfire/server.log), the updated property will be shown as follows:
image.png

2. Below are the steps that we need to perform in order to change the JVM parameters:
  • ssh into the server VM:
bosh -d <service> ssh <server VM> 
  • Login as the root user:
sudo su
  • cd into the following directory:
/var/vcap/jobs/gemfire-server/bin/
  • Edit the bpm-start and add or change the configuration value.
Below is an example and a screenshot of the kinds of configurations that can be added or changed using this method:
# JVM Xmx and Xms parameters now set in pre-start
cd /var/vcap/store/gemfire-server && \
exec java \
-XX:NewSize="$jvm_yg_mem"m \
-XX:MaxNewSize="$jvm_yg_mem"m \
-Xms6463m \
-Xmx6463m \
image.png
  • Monit restart all the VMs
monit restart all
  • Then in the server.log (at /var/vcap/sys/log/gemfire-server/gemfire/server.log), the updated property will be shown as follows:image.png