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.
[server]

; -----------------------------
; 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        = 0.0.0.0
core-file

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.

Warning

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 = 0.0.0.0 IP address the server binds to. If you specify a value other than 0.0.0.0, 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 人工从互联网中收集并分享;
内容版权归原作者所有;
本人对内容的有效性/合法性不承担任何强制性责任.
若有不妥, 欢迎评注提醒:

或是邮件反馈可也:
askdama[AT]googlegroups.com



自怼圈/年番新

DU21.7
关于 ~ DebugUself with DAMA ;-)


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


粤ICP备18025058号-1
公安备案号: 44049002000656 ...::