Configuration settings for Java memory issues

If Java out-of-memory errors occur when you use Teracloud® Streams, you can allocate more memory for the Java environment by increasing the maximum JVM size for Teracloud® Streams services and user interfaces.

Updating the JVM size for services that run independently

The rest, jmx, application, data, and view services all run independently of the domain and instance service containers.

Update the following properties to adjust the JVM size for these services, where * is replaced with the service name.

  • *.initialJvmSize
  • *.maximumJvmSize

Updating the JVM size for Teracloud® Streams services

If you are running the domain controller service as a registered Linux system service, the default maximum JVM size is 1024 megabytes. You can use the following streamtool commands to set the JVM size for the controller to a different value:
  • registerdomainhost
  • chdomainhostconfig
  • getdomainhostconfig
  • rmdomainhostconfig
For more information about these commands, enter streamtool man command-name.
For the other Teracloud® Streams services, you can either explicitly set the maximum JVM size, or allow Teracloud® Streams to select a value based on the setting of the domain.jvmSizeComputationEnabled property:
  • If the domain.jvmSizeComputationEnabled property is set to the default value of true, Teracloud® Streams selects a maximum JVM size based on the system memory usage.
  • If the domain.jvmSizeComputationEnabled property is set to false, Teracloud® Streams selects a maximum JVM size based on the system default size.

You can specify the JVM size for Teracloud® Streams services by using the following domain and instance properties:

  • controller.maximumJvmSize
  • domainServiceContainer.initialJvmSize
  • domainServiceContainer.maximumJvmSize
  • instanceServiceContainer.initialJvmSize
  • instanceServiceContainer.maximumJvmSize

For more information about the controller and domain properties, enter streamtool man domainproperties. For more information about the instance properties, enter streamtool man properties.

If the security.runAsRoot property is set to true, the authentication and authorization service and logging service can run independently. Use the following domain properties to specify the JVM size for these services:
  • aas.initialJvmSize
  • aas.maximumJvmSize
  • auditlog.initialJvmSize
  • auditlog.maximumJvmSize
For more information about these properties, enter streamtool man domainproperties.

Updating the JVM size for the Streams Console

For Streams Console out-of-memory errors, you can either explicitly set the maximum JVM size for the web management service, or allow Teracloud® Streams to select a value based on the setting of the domain.jvmSizeComputationEnabled property:
  • If the domain.jvmSizeComputationEnabled property is set to the default value of true, Teracloud® Streams selects a maximum JVM size based on the system memory usage.
  • If the domain.jvmSizeComputationEnabled property is set to false, Teracloud® Streams selects a maximum JVM size based on the system default size.
To increase the amount of memory that can be allocated to the Java environment for the web management service, use the following domain properties:
  • sws.initialJvmSize
  • sws.maximumJvmSize
For more information about these properties, enter streamtool man domainproperties.

For troubleshooting information, see Java out-of-memory error in the Streams Console.

Updating the JVM size for the streamtool command-line interface

For streamtool command errors, you can set the maximum JVM size by using the STREAMTOOL_MAX_JVM_SIZE environment variable, for example:
export STREAMTOOL_MAX_JVM_SIZE=size
Notes:
  • The size that you specify cannot exceed the amount of memory that is available on the resource where you run streamtool commands. For a size of 256 megabytes, specify 256m. For a size of 1 gigabyte, specify 1g.
  • If the STREAMTOOL_MAX_JVM_SIZE environment variable is not set, Teracloud® Streams selects a maximum JVM size based on the system default size.

For troubleshooting information, see Java out-of-memory error when using streamtool commands.