Advanced Service Instance Configuration

Warning: This is an advanced feature and can have a significant impact on the stability of the GemFire cluster and the underlying JVM. Users should advance with caution unless they are an advanced user or are being instructed by support staff.

The advanced configuration feature allows users to configure custom JVM options, GemFire properties, Credentials, and Resource Manager properties. While the majority of parameters have the ability to be changed, there is a small group that cannot be changed due to their impact on the TAS platform.

The following JVM options are unavailable for customization

-Xms
-Xmx
-Xloggc
-XX:NumberOfGCLogFiles
-XX:GCLogFileSize
-XX:OnOutOfMemoryError
-XX:+DisableExplicitGC

The following GemFire property is unavailable for customization

-Dgemfire.OSProcess.ENABLE_OUTPUT_REDIRECTION

Furthermore, if one of the following properties below is set, then Tanzu GemFire for VMs will NOT set default values for any of the other properties listed below. The responsibility lies on the user to determine and set all of the values.

-XX:NewSize
-XX:MaxNewSize
-XX:CMSInitiatingOccupancyFraction
-XX:+UnlockDiagnosticVMOptions
-XX:ParGCCardsPerStrideChunk=32768
-XX:+UseConcMarkSweepGC
-XX:+UseCMSInitiatingOccupancyOnly
-XX:+CMSClassUnloadingEnabled

Setting Advanced Configurations

Users can set an advanced_configuration when creating a service instance such as:

cf create-service p-cloudcache dev-plan qa_instance -c 
'{
   "advanced_configuration":{
      "server":{

         "jvm_options":["-XX:+UnlockDiagnosticVMOptions",   
             "-XX:ParGCCardsPerStrideChunk=1274"],

         "gemfire_properties":{"enable-cluster-configuration":"true"},

         "credentials": {
           "db_user_credhub_key": "credhub/ref/myuser",
           "db_password_credhub_key": "credhub/ref/mypassword"
         },

        "resource_manager": {
            "critical_heap_percentage": 80,
            "eviction_heap_percentage": 60
          }
      },

      "locator":{

         "jvm_options":["-XX:+UseNUMA"],

         "gemfire_properties":{"groups":"QA_DB_1"},

         "credentials": {
           "db_user_credhub_key": "credhub/ref/myuser",
           "db_password_credhub_key": "credhub/ref/mypassword"
         },

        "resource_manager": {
            "critical_heap_percentage": 80,
            "eviction_heap_percentage": 60,
    }
      }
   }
}'

The advanced_configuration allows users to set options for the servers and the locators. Within each (server and locator) users can set jvm_options, gemfire_properties, credentials, and resource managers.

Updating a service instance with advanced configuration.

To update a service instance with advanced configurations, run the cf update-service command with the configuration you would like to apply to the service instance.

Warning

This new configuration WILL OVERWRITE any previous advanced configuration that may have been set on the service instance. Any configuration option not set in the advanced_configuration update to the service instance will revert back to the default value.

cf update-service qa_instance -c 
'{
   "advanced_configuration":{
      "server":{
         "jvm_options":["-XX:+UnlockDiagnosticVMOptions",   
             "-XX:ParGCCardsPerStrideChunk=1274"],
         "gemfire_properties":{"enable-cluster-configuration":"true"},
         "credentials": {
           "db_user_credhub_key": "credhub/ref/myuser",
           "db_password_credhub_key": "credhub/ref/mypassword"
         },
        "resource_manager": {
            "critical_heap_percentage": 80,
            "eviction_heap_percentage": 60
          }

      },
      "locator":{
         "jvm_options":["-XX:+UseNUMA"],
         "gemfire_properties":{"groups":"QA_DB_1"},
         "credentials": {
           "db_user_credhub_key": "credhub/ref/myuser",
           "db_password_credhub_key": "credhub/ref/mypassword"
         },
         "resource_manager": {
            "critical_heap_percentage": 80,
            "eviction_heap_percentage": 60
          }
      }
   }
}'

Reset Advanced Configuration to Default Values

To reset all advanced settings to their default values, run the cf update-service command and set the advanced_configuration settings to empty brackets {}.

cf update-service qa_instance -c 
'{
   "advanced_configuration":{}
}'