Persistence Service Configuration Parameters

This topic presents the FTL server configuration parameters that apply to the persistence service.

Example

The example configuration file has two sections: globals and servers.

#Sample yaml file that demonstrates how to start three FTLServers with non-default persistence cluster.
globals:
  core.servers:
    ftlserver1: localhost:8585
    ftlserver2: localhost:8685
    ftlserver3: localhost:8785

servers:
  ftlserver1:
    - realm:
        # Update this field accordingly (for windows use backward slashes)
        data: TIBCO_HOME/persistence/ftlserver1/realm/data
    # Starts a non-default persistence server name pserver1
    # that belongs to a non-default persistence cluster
    # a persistence cluster with this server name needs to be configured
    - persistence:
        name: pserver1
        # Update this field accordingly (for windows use backward slashes)
        data: TIBCO_HOME/persistence/ftlserver1/pserver1/data
        savedir: TIBCO_HOME/persistence/ftlserver1/pserver1/dumpdata
  ftlserver2:
    - realm:
        # Update this field accordingly (for windows use backward slashes)
        data: TIBCO_HOME/persistence/ftlserver2/realm/data
    - persistence:
        name: pserver2
        # Update this field accordingly (for windows use backward slashes)
        data: TIBCO_HOME/persistence/ftlserver2/pserver2/data
        savedir: TIBCO_HOME/persistence/ftlserver2/pserver2/dumpdata
  ftlserver3:
    - realm:
        # Update this field accordingly (for windows use backward slashes)
        data: TIBCO_HOME/persistence/ftlserver3/realm/data
    - persistence:
        name: pserver3
        # Update this field accordingly (for windows use backward slashes)
        data: TIBCO_HOME/persistence/ftlserver3/pserver3/data
        savedir: TIBCO_HOME/persistence/ftlserver3/pserver3/dumpdata

Name

Parameter Arguments Description
name <service_name> Required.

Set the name of this persistence service. The <service_name> must match one of the service names defined in the persistence cluster definition.

To specify parameters for the default persistence service, set this to _default.

Note: The service name must be distinct for each FTL server.

File I/O

Parameter Arguments Description
data <path> Optional.

When present, the persistence service stores its working data files in this <path> location. (The directory at <path> must already exist, as the persistence service does not create it automatically.)

When absent, the default <path> is the current directory.

Ephemeral metadata is stored in this directory. If disk persistence is enabled, persistence data, including messages and acknowledgments, are written to this directory. If message swapping is enabled, data messages are swapped out to this directory by default. See swapdir later in this table.

savedir <path> Optional.

When present, the persistence service can write its state file in this <path> location. (The directory at <path> must exist, as the persistence service does not create it automatically.)

When absent, the default <path> is the current directory.

The state file name is always <service_name>.state.

A persistence service writes its state file only in response to an explicit command. This parameter specifies the location, but does not trigger a save operation. See Saving the State of a Persistence Service and POST persistence/clusters/<clus_name>/servers/<svc_name>.

This parameter does not affect loading a state file.

load <path> Optional.

Use this parameter when moving operations to a new physical location. After saving the state of the persistence service, copy the state file to <path> at the new location. Then use the load parameter to load that state when the persistence service starts at the new location.

When present, the persistence service loads its state from this state file. (Specify the complete file pathname, not only the directory path.)

When absent, the service loads its state from the default state file, <service_name>.state.

For more information, see Restarting a Persistence Cluster with Saved State.

swapdir <path> Optional.

When present and disk_swap is set to true, persistence service can write its message swap file in this <path> location. (The directory at <path> must exist, as the persistence service does not create it automatically.)

When absent, the default <path> is the designated data directory.

max.disk.fraction <path>

Optional.

The max.disk.fraction parameter monitors disk capacity and prevents a disk full state. You must also enable disk_persistence in the realm configuration.

The persistence service measures disk usage across the whole volume. Client publish calls fail once total disk usage approaches the max.disk.fraction setting multiplied by the capacity of the disk containing the persistence data directory.

The default value is 0.95. Values less than 0 and more than 1 are not allowed. A value of 0 disables the feature.

For more information, see Persistence Architecture, Setting Automatic Disk Persistence File Compaction.

 

Also see: Saving and Loading Persistence State

Memory Reserve

Parameter Arguments Description
mem.reserve <size> Optional.

When present, the persistence service reserves memory so it can continue limited operations after exhausting available memory.

The <size> argument specifies the amount of memory in bytes. The minimum size is 100 megabytes.

When absent, the persistence service allocates the minimum size reserve.

For more information, see Memory Reserve for Persistence Services.

Tracing and Logging

Logging should be set in the configuration file at the server level in ftlserver.properties.

Parameter Arguments Description
loglevel <level> Optional.

When present, the persistence service outputs log messages to stderr.

You may specify any of the standard log level strings. See “Tuning the Log Level” in TIBCO FTL Development. You can set a general log level, or custom log levels for different elements.

max.logs <logs>

Optional.

Available if logfile is set.

Limits the maximum number of rolling log files.

max.logs can be:

  • Not specified: The FTL server uses the default value of 20.

  • Equal to 1 : The max.log.size is ignored.

  • A number greter than 1 and less than 1000.