Tuning configuration

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

Here's a list of all the tuning-related configuration items; to get more detail, just click on the item you're interested in. Some of the links take you to other pages; these are indicated by "(in page name)" 

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

container-yield-size

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.

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

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

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.

Tip: 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 you assign threads-num a value greater than the maximum number of threads supported by Liberator (see 'Values accepted' below), then Liberator logs a warning to the console and to the event log, and reduces the number of client threads to 1.

Increasing threads-num can improve Liberator's performance in handling a higher number of client connections, 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 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

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
or
thread-queue-notify-always TRUE

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.

user-hash-size

user-hash-size specifies the size of the user hashtable for authorizing users who log in to Liberator.

Tip: We recommend setting user-hash-size to twice the expected maximum number of
usernames.

Syntax:

user-hash-size <size-in-table-entries>

Type: integer

Default value: 8192 entries