Tuning configuration

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

Other configuration items related to tuning are documented elsewhere. See the links at the foot of this page.

buf-cache-size

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

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

object-hash-size

object-hash-size specifies the size of the hashtable that Liberator uses to manage its objects. 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.

In addition to requested objects, Liberator allocates an internal object for each client session. So, at a minimum, set object-hash-size to: max_num_objects + max_concurrent_users.

We recommend that you set object-hash-size to twice the maximum number of objects that Liberator is likely to handle.

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

Type: integer

Default value: 16384

output-queue-size

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

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)

threads-num

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

If the value of threads-num is greater than the maximum number of threads supported by Liberator (see 'Values accepted' below), then Liberator logs a warning to the console and the event log, and reduces the number of client threads to 1.

When Liberator needs to handle a high number of user connections, increasing threads-num can improve performance, but this must take into account the number of CPUs on the machine running the Liberator. For more about this, see Threading in Liberator Features and Concepts.

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 6.2.15 and higher: 1–64

  • Liberator 6.2.14 and lower: 1–10

thread-queue-notify-always

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

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

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.