Initial MySQL Cluster Configuration

MySQL and MariaDB

Audience
Public
Source Type
Documentation

On the management node, create a file (config.ini) on the management node directory intended for datadir.

An example starting configuration can be found in the MySQL documentation.

The following sections and variables can be used for a basic deployment:

Parameter Name

Description

Default Value

Suggested Value

[ndb_mgmd default]\DataDir

The Data Directory on the management node.

N/A

N/A

[ndb_mgmd]\HostName

The hostname of the management node.

For multiple management servers duplicate the [ndb_mgmd] section.

N/A

N/A

[ndbd default]\NoOfReplicas

The number of fragment replicas. A minimum of two is required to guarantee the availability of data.

2

Min 2 NoOfReplicas for redundancy. Max 4.

[ndbd default]\DataMemory

This is the amount of memory available to data being stored in the NDB cluster.

98M

> 1Gb

[ndbd default]\NoOfFragmentLogFiles

Sets the number of REDO log files per node.

16

If checkpointing is slow increase this value.

[ndbd default]\ODirect

If this parameter is enabled then NDB will attempt to use O_DIRECT writes for storage operations.

false

Recommended for Linux systems when using EXT4.

[ndbd default]\RealTimeScheduler

If enabled data node threads will be done using real-time scheduling.

false

Enabling real-time scheduling can increase Data Node throughput.

[ndbd default]\TimeBetweenGlobalCheckpoints

Defines the time between global checkpoints in milliseconds.

2000

< 3000

[ndbd default]\RedoBuffer

Sets the size of the buffer in which the REDO log is written.

32MB

Increase this value for systems with frequent updates to data.

[ndbd default]\

MaxNoOfExecutionThreads

Only if using ndbmtd affects the number of execution threads on a Data Node.

2

Depending on CPU > 16

[ndbd default]\MaxDiskDataLatency

Controls the maximum allows mean latency for disk access.

Note:

Recommendation for FlashArray and controlling IO Subsystem pressure: QOS.

0

0

[ndbd]\

HostName

The Hostname or IP Address of the Data Node.

N/A

N/A

[ndbd]\

NodeId

(Optional) The Node ID of the Data Node.

N/A

N/A

[ndbd]\

DataDir

The Data directory where NDB data will be stored on a Data Node.

N/A

N/A

[ndbd]\BackupDataDir

The directory in which backups are placed.

DataDir/FilesystemPath

Path to FlashArray MySQL Cluster Backup Volume for Node for NFS share for Node.

Each Node should have its own Backup directory.

[mysqld]\

HostName

The Hostname of a SQL Node.

N/A

N/A

This is an example config.ini file:


[ndb_mgmd default]
# Directory for management node log files
DataDir=/var/lib/mysql-cluster

[ndb_mgmd]
# Management Node IP Address
HostName=10.21.227.36

[ndbd default]
NoOfReplicas=2      # Number of replicas
DataMemory=368G     # Memory allocate for data storage
TimeBetweenGlobalCheckpoints=3000

[ndbd]
# Data Node
HostName=10.21.227.39
NodeId=2
DataDir=/usr/local/mysql/data
BackupDataDir=/usr/local/mysql/backup

[ndbd]
# Data Node 
HostName=10.21.227.40
NodeId=3
DataDir=/usr/local/mysql/data
BackupDataDir=/usr/local/mysql/backup

[mysqld]
# SQL Node 
HostName=10.21.227.37

[mysqld]
#SQL Node 
HostName=10.21.227.38