Tuning configuration

These Liberator configuration items enable you to tune Liberator’s performance.

For links to more tuning related configuration, see the related links at the foot of this page.


buf-cache-size specifies the overall size of Liberator’s buffer cache in megabytes.

We suggest a maximum value of 512 megabytes

Syntax: buf-cache-size <size-in-megabytes>

Type: integer

Default value: 16 megabytes


buf-elem-len specifies the length of of a standard buffer element, in bytes. Increasing this improves performance if using very large messages, but it will considerably affect memory usage.

We recommend using the default value of 4096 bytes.

Syntax: buf-elem-len <length-in-bytes>

Type: integer

Default value: 4096 bytes


container-yield-size specifies the maximum number of records that can be served from a container before the operation yields possession of the session thread and is moved to the back of the session thread’s work queue. Serving containers in batches of rows prevents the serving of a large container from delaying the processing of other operations in a session thread’s queue. This increases the perceived responsiveness of a client application, at the expense of a small overhead in switching between operations.

When setting a window size for a StreamLink subscription to a container (Subscription.setContainerWindow), set the window size to a value less than the value of container-yield-size.

Since: Liberator 7

Syntax: container-yield-size <size-in-entries>

Type: integer

Default value: 100

Values accepted: 1–n (where n is the maximum value of an integer on the platform)


object-hash-size specifies the size of the hashtable that Liberator uses to manage its objects.

We recommend that you set object-hash-size to twice the maximum number of objects Liberator is likely to handle. Increasing this item makes Liberator use extra memory, but it speeds up updates and requests if the value is high enough to ensure there aren’t too many hash collisions. (Also see Note 1 below)

Syntax: object-hash-size <size-in-table-entries>

Type: integer

Default value: 5000 entries

Note 1: Liberator allocates an internal object for each client session, so the minimum value of object-hash-size should be the maximum number of objects + the maximum number of concurrent users.


output-queue-size specifies the number of update messages the Liberator stores per client. The main use for this item is when a client loses its connection to Liberator; while the connection is down, Liberator stores updates that are received for the client’s subscriptions and sends them to the client when the connection is re-established.

Increase the queue size if there are lots of reconnects, or if the data updates fast and the queue fills up quickly.

Syntax: output-queue-size <size-in-messages>

Type: integer

Default value: 64 messages

Values accepted: Maximum 4096 messages


response-batch-size specifies the maximum size in bytes of RTTP response messages. It only applies when the StreamLink connection type is "Streaming JavaScript via IFrame" ("type 5" connections).

Syntax: response-batch-size <size-in-bytes>

Type: integer

Default value: 0 (no maximum size is set)


system-max-files specifies the maximum number of file descriptors that Liberator’s process may create. Liberator requires file descriptors for user sessions, log files, connections with DataSource peers, and HTTP requests.

On start up, Liberator adjusts the file descriptor limit for its process to system-max-files, or the licensed number of users plus a margin of 512, whichever is the greater of the two values. If Liberator is licensed for an unlimited number of users, only the value of system-max-files is used.

On a Liberator licensed for an unlimited number of users, set system-max-files to the expected number of users plus a margin of 512.

If Liberator is started as an unprivileged user, it cannot set a file descriptor limit greater than the user’s hard limit (the output of ulimit -H -n). In Red Hat Enterprise Linux 7, the default user hard-limit for open file descriptors is 4096. If Liberator fails to set a file descriptor limit, it writes NOTIFY: Failed to set system-max-files to value to the event log, and retries with successively lower values until it succeeds, halving the value with each attempt.

To avoid the restriction of the user hard-limit for file descriptors, use one of the options below:

  • Start Liberator as root. After Liberator has used root privileges to set its file descriptor limit and bind to TCP/IP ports, Liberator runs as the user specified by the runtime-user configuration item.

  • Increase the file descriptor hard-limit for the user that Liberator runs as. See How to set ulimit values.

Syntax: system-max-files <max-number>

Type: integer

Default value: 1024


threads-num specifies the number of client threads (session threads) that Liberator should use to serve RTTP clients.

When the contention between threads for CPU cores is low, increasing the number of Liberator’s session threads can increase the number of clients Liberator can service.

For Liberator deployments managed by the Deployment Framework, don’t edit the threads-num configuration item directly. Instead, edit the LIBERATOR${THIS_LEG}_THREADS_NUM configuration variable in the Deployment Framework file global_config/environment.conf.

If you assign threads-num a value outside the range of valid values, then Liberator logs a warning to the console and to the event log, and reduces the number of client threads to 1.

Liberator also uses additional threads for DataSource peer connections. See How can I…​ Configure threads for peer communication.

Syntax: threads-num <max-number>

Type: integer

Default value: 1

Values accepted:

  • Liberator 7.0.1 and later versions: 1–64

  • Liberator 6.2.15 and later versions: 1–64

  • Liberator 6.2.14 and earlier versions: 1–10


thread-queue-notify-always is a boolean item that, when set to TRUE, causes Liberator to record the size of Liberator’s threads queue in the event log every thread-queue-notify-period seconds.

Only set this item when debugging a Liberator installation.

Alternatively, you can just configure Liberator to log the size of the threads queue when it exceeds a given size – see thread-queue-notify-levels.

An event log entry about the threads queue, typically looks like this:

2014/11/24-16:33:41.123 +0000: NOTIFY: Thread 0: Queue size is 0

Syntax: thread-queue-notify-always <boolean>

Type: boolean

Default value: FALSE (no time-based logging of the threads queue)

For more about the event log, see Liberator logging.


thread-queue-notify-levels specifies an array of queue sizes at which Liberator logs information about the size of Liberator’s threads queue to the event log.

For example:

thread-queue-notify-levels 10 100

With the above configuration, Liberator reports the initial size of the threads queue, and if the size subsequently exceeds 10 entries, it logs the size. If after this, the queue size exceeds 100 entries, it logs the size again.

Only set this item when debugging a Liberator installation.

Alternatively, you can just configure Liberator to log the size of the threads queue at regular intervals by setting thread-queue-notify-always and thread-queue-notify-period.

If you specify thread-queue-notify-levels together with thread-queue-notify-always and thread-queue-notify-period, Liberator first logs the queue size when it exceeds the first level in thread-queue-notify-levels, and then writes log entries every thread-queue-notify-period.

Syntax: thread-queue-notify-levels level-1 level-2 level-3 …​

Type: integer

Default value: 10000 100000 1000000

For more about the event log, see Liberator logging.


thread-queue-notify-period specifies the interval at which Liberator records the size of Liberator’s threads queue in the event log when thread-queue-notify-always is TRUE.

Only set this item when debugging a Liberator installation.

Syntax: thread-queue-notify-period <interval-in-seconds>

Type: float

Default value: 0 seconds (timer is disabled)

For more about the event log, see Liberator logging.