Open topic with navigation

# 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. |
disk.prealloc.size | <size> | Optional. This parameter only takes effect if disk persistence is enabled for the persistence service. Specify an integer representing the number of bytes to pre-allocate on disk. When specified, the persistence service will extend an existing database to this size, or create a new database of this size Enabling pre-allocation can avoid the overhead of extending the database file in situations where the message backlog is growing. |
force.disk.load |  | By default, if the persistence service encounters a corrupt record in its database, the persistence service stops loading the database and exit. If other quorum members are running and up to date, the recommended course of action is to move or delete the corrupted database. On restart the persistence service syncs from the other quorum members. If this is not possible because no other quorum members are running, you can use this parameter to force the persistence service to load the database. The corrupted record is discarded. |

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.

## Logging

Parameter | Arguments | Description
--- | --- | ---
loglevel | <level> | When present, the persistence service logs protocol communication at this level of detail. You may specify any of the standard log level strings. See “Tuning the Log Level” and its sub-topics in TIBCO FTL Development. You can set a general log level, or custom log levels for different elements. When this parameter is absent, the default level is info.

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO FTL® - Enterprise Edition

Copyright © 2009-2024. Cloud Software Group, Inc. All Rights Reserved.