memsql.cnf Settings

MemSQL node settings are configured in the memsql.cnffile, which is a compatible extension of MySQL’s my.cnf file.

Default memsql.cnf Settings

The code listing below shows the default memsql.cnf file included with MemSQL.

  • For a basic MemSQL installation, you should not need to change these settings at all.
  • For a more customized installation, see the description of each setting later on this page.

; -----------------------------
; MemSQL configuration options:
; -----------------------------

; Possible values: on, off
; If durability is off, no data is saved to disk, but database
; and table definitions are persisted.
durability          = on

; The transaction buffer is a per-database, in-memory buffer of the
; transaction log. By default, it is asynchronously flushed to disk.
; You can set it to 0 for synchronous durability (transactions are
; flushed on commit). A positive value sets the size of the buffer.
transaction-buffer  = 128m

; snapshot-trigger-size indicates the size of the transaction
; log at which MemSQL starts a snapshot and truncates the log
snapshot-trigger-size = 2g

; ---------------------------------
; MySQL-style configuration options
; ---------------------------------

basedir             = .
tmpdir              = .
lc-messages-dir     = ./share
socket              = memsql.sock
port                = 3306
lock_wait_timeout   = 60
bind-address        =

Individual Settings

The following table describes the memsql.cnf settings that are relevant to MemSQL.

Setting Functionality
durability = mode

Determines what data is persisted to disk.

  • If set to on, MemSQL will take periodic snapshots and log intermediate changes.
  • If set to off, MemSQL will persist only metadata to disk.


Do not set durability to off unless you have read and thoroughly understood the section Using Durability and Recovery, and you are certain that you do not need durability.

transaction-buffer = size Size of the in-memory buffer that holds data not yet flushed to disk.
snapshot-trigger-size = size Amount of data to be logged between snapshots.
default-partitions-per-leaf = number When you create a database in the distributed system, MemSQL will create default-partitions-per-leaf*<the number of leaves> partitions in the cluster. You can specify the total number of partitions explicitly per database with CREATE DATABASE dbname PARTITIONS=N.
max-pooled-connections = number Maximum number of connections a MemSQL aggregator will stash to any leaf. If the connection pool is maxed out, the aggregator will attempt to open more connections as needed and only save them to the pool if there is space.
leaf-failure-detection = on or off
  • If set to on (the default), then the master aggregator will monitor and automatically failover partitions if a leaf dies. This switch is ignored on non-master aggregators.
  • Set to off to disable leaf failure detection behavior.
aggregator-failure-detection = on or off
  • If set to on (the default), then the aggregator will regularly ping every other aggregator. If it cannot connect to a majority of them, then it will automatically shut off to avoid serving data against cluster metadata that may be out-of-date.
  • Set to to off to disable partition detection behavior.
basedir = . Path to the memsqlbin directory.
tmpdir = /tmp/ Store temporary files in /tmp/.
lc-messages-dir = ./share Location of localized messages.
socket = /tmp/memsql.sock Unix domain socket that MemSQL listens on.
port = 3306 TCP port that MemSQL listens on. Default is 3306, the standard MySQL port.
lock_wait_timeout = 60 Time to wait (in seconds) on row-locks during insert transactions before aborting.
bind-address = IP address the server binds to. If you specify a value other than, then MemSQL will accept connections from only that address.
core-file Create a core file in $datadir if MemSQL crashes. It might be necessary to execute ulimit -c unlimited before starting the server to let the system generate large core files. The core files can be very large, so omit core-file if you don’t have much available disk space.

Setting the Redundancy Level

The redundancy level specifies the maximum number (1 or 2) of Availability Groups in a cluster. By default, this is set to 1. As an alternative to setting the redundancy_level system variable (see Redundancy Level), you can configure the redundancy level by adding the redundancy_level setting anywhere in the memsql.cnf file. There are two settings:

  • redundancy_level=1 (default) - no redundancy
  • redundancy_level=2 - to allow up to two availability groups
当前网页内容, 由 大妈 ZoomQuiet 使用工具: ScrapBook :: Firefox Extension 人工从互联网中收集并分享;
若有不妥, 欢迎评注提醒:



关于 ~ DebugUself with DAMA ;-)

关注公众号, 持续获得相关各种嗯哼:

公安备案号: 44049002000656 ...::