Engine Variables

Engine variables are configuration settings that control various aspects of the database's behavior. Engine variables fine-tune the performance and behavior of SingleStore to best suit specific workload requirements.

SingleStore defines engine variables as either sync or non-sync. Sync variables are cluster-wide variables that you set on the master aggregator. When you set the variable, the value is propagated across the cluster to all relevant nodes. The value is persisted in the internal cluster database. Non-sync variables are set locally, independently on each node. The value does not persist in the engine.

Non-sync variables can be persisted in the engine via the memsql.cnf file.

Engine variables can be set globally or per session in scope. Global engine variables affect all connections to the database. If a global engine variable value is changed, then the change affects all existing and subsequent connections. Session engine variables affect the individual client connections they are set on. Session engine variables can also be set globally. After setting a session variable globally via the SET GLOBAL command, client connection pools should be flushed to make the new value effective throughout a cluster. Engine variables that can be set per session and globally are denoted in the Description column of the list of variables table by the verbiage This is a session variable that can also be set globally. Otherwise, the engine variable can only be set globally.

Sync

Non-Sync

Global

Sync global variables are cluster-wide engine variables that are set on the master aggregator and their values are propagated across the cluster to all relevant nodes. Their values are effective for the current connection to the node and any other existing or subsequent connections. The values persist across restarts.

Non-sync global engine variables are set locally and independently on each node. Their values are effective for the current connection to the node and any other existing or subsequent connections. The values do not persist across restarts.

Session

Sync session variables are cluster-wide engine variables that are set on the master aggregator and their values are propagated across the cluster to all relevant nodes if set with SET GLOBAL. If set with SET (or SET SESSION), the values will only change the copy if the variable is local to the connection. Their values are specific to each session and do not affect other connections.

Non-sync session engine variables are set locally and independently on each node. Their values are specific to each session and do not affect other connections.

The following sections discuss these variables and how to set them.

In this section

Last modified: August 22, 2024

Was this article helpful?