Detailed description of MySQLCluster configuration file (config. ini) MySQL Cluster configuration file (config. ini)
######################################## ###################################
# MySQL CLuster configuration file
# With [!] The parameter is described in detail. we recommend that you refer to the official description.
# With [!] When Setting this parameter, you should read the official description in detail.
# For details about how to configure the SCI connection mode, refer to the official description.
# Official description: http://dev.mysql.com/doc/refman/5.1/zh/ndbcluster.html (Old Chinese version)
Version 5.6: http://dev.mysql.com/doc/refman/5.6/en/index.html
######################################## ###################################
######################################## ###################################
# Define MySQL Cluster TCP/IP connection
# TCP/IP is the default transmission protocol used by the MySQL Cluster to establish connections. normally, no connection is required.
# * You can use the [tcp default] definition.
######################################## ###################################
[Tcp default]
# [TCP]
# [!] TCP transmission cache
# The default value is 256KB.
SendBufferMemory = 256 k
# [!] Message ID transmitted over the network.
# This feature is disabled by default. (value: Y/N or 1/0)
# SendSignalId = 0
# [!] Enabling this parameter will calculate the checksum for all parameters before all messages are placed in the sending buffer.
# This feature is disabled by default. (value: Y/N or 1/0)
# Checksum = 0
# Specify the buffer size used to receive data from the TCP/IP Socket.
# You almost do not need to change the default value of this parameter. the default value is 64 KB.
ReceiveBufferMemory = 64 k
######################################## ###################################
# DefinitionManage servers(MGM)
#
# Used to configure and manage server behavior. the following parameters can be ignored. if so, the default value is used.
# If ExecuteOnComputer or HostName is not defined, it is specified as localhost
# * You can use [NDB_MGMD DEFAULT] to define the DEFAULT behavior of multiple management nodes.
######################################## ###################################
[NDB_MGMD DEFAULT]
[NDB_MGMD]
# Unique ID of a node in the cluster. value range: 1 ~ 63
Id = 1
# Specify the node host name or IP address
HostName = 192.168.1.100
# Reference one of the computers defined in [COMPUTER]
# ExecuteOnComputer =
# Manage the server listening port (default value: 2202)
PortNumber = 2202
# Node log source method
# The following values are recommended:
#1. CONSOLE
# Output logs to the standard output device (stdout ).
#2. SYSLOG: facility = syslog
# Send the log to the syslog (System Log) soft device. possible values:
# Auth, authpriv, cron, daemon, ftp, kern, lpr, mail, news, syslog
#, User, uucp, local0, local12 ~ 7
#3. FILE: filename =/var/log/mgmd. log, maxsize = 1000000, maxfiles = 6
# Output logs to files. you can specify the following values:
# Filename: name of the log file.
# Maxsize: the maximum size of a log file. when the size is greater than this size, a new log file is automatically created.
# Maxfiles: maximum number of log files
LogDestination = FILE: filename =/var/log/mgmd. log
# Specify which node plays the decision role. only MGM nodes and SQL nodes can be used. (default value: 1)
# Generally, set the value to 1, set all SQL nodes to 0, and use the MGM server as the decision-making program.
# One of the following values is recommended:
#0: this node will never be used for decision-making.
#1: The node has a high priority.
#2: The node has a low limit.
ArbitrationRank = 1
# Specify the latency of the management server for decision-making requests, in milliseconds. the default value is 0.
# Generally, you do not need to change it.
ArbitrationDelay = 0
# Save the location of the output file of the management server, including the log, process output file, and pid file of the program
# You can set the FILE parameter of LogDestination to overwrite a log FILE.
DataDir =/var/lib/mysql-cluster
######################################## ###################################
# DefinitionData nodeDEFAULT behavior (ndbd default)
# NoOfReplicas is a required parameter
######################################## ###################################
[Ndbd default]
# Define the number of copies saved for each table in the cluster, and specify the node group size.
# A node group is a set of nodes that save the same information.
# Generally, you do not need to specify a value for this parameter.
# NoOfReplicas has no default value. The maximum value is 4.
NoOfReplicas = 1
######################################## ###################################
# Define a data node (NDBD)
#
# Used to configure the behavior of data nodes.
# ExecuteOnComputer or HostName is a required parameter.
# For various parameters, the suffix k, M, or G can be used to specify the unit.
######################################## ###################################
[NDBD]
# When starting a node, you can assign an id (that is, a data node id) in the command line, or in the configuration file.
Id = 11
# Specify the node host name or IP address
HostName = 192.168.1.101
# Reference one of the computers defined in [COMPUTER]
# ExecuteOnComputer =
# Specify the directory for storing trace files, log files, pid files, and error logs.
DataDir =/var/lib/mysql-cluster
# This parameter specifies all files, REDO logs, UNDO logs, and data file directories created for metadata.
# Note: The Directory must exist before the ndbd process starts.
# FileSystemPath =
# Specifies the directory for storing backups. the default value is {FileSystemPath}/BACKUP.
# BackupDataDir =
# Specify the data memory. the default value is 80 MB and the minimum value is 1 MB.
DataMemory = 80 M
# Specify the index memory. the default value is 18 MB and the minimum value is 1 MB.
IndexMemory = 18 M
# [!] Used to set the number of possible concurrent transactions in the node. the default value is 4096.
# Parameters must be set to the same value for all nodes.
# MaxNoOfConcurrentTransactions = 4096
# [!] Set the number of records that can appear in the update phase or be locked at the same time. the default value is 32768.
#
# MaxNoOfConcurrentOperations = 32768
# [!] By default, this parameter is calculated based on 1.1 * MaxNoOfConcurrentOperations,
# It is suitable for systems that have many concurrent transactions but do not have any serious transactions.
# If you need to handle extra-large transactions at a certain time and there are many nodes,
# It is best to specify this parameter to overwrite the default value
# MaxNoOfLocalOperations =
# [!] The default value of this parameter is 8192.
# Only when the unique hash index is required to perform extremely high parallel operations in rare cases,
# It is necessary to increase the value.
# If you are sure that the cluster does not require high parallel operations, you can use a smaller value and save memory.
# MaxNoOfConcurrentIndexOperations = 8192
# [!] The default value is 4000, which is sufficient for most cases.
# In some cases, if you think that the requirements for parallel operations in the cluster are not high, you can even lower it.
# MaxNoOfFiredTriggers = 4000
# [!] The memory affected by this parameter is used to track the operations performed when updating the index table and reading the unique index.
# This memory is used to save key and column information about such operations.
# You almost do not need to change the default value of this parameter.
# TransactionBufferMemory = 1 M
# [!] This parameter controls the number of parallel scans that can be performed in the cluster.
# The default value is 256 and the maximum value is 500.
# Maxnoofconcurrentscradi= 256
# [!] If many scans are not completely parallel, specify the number of local scan records.
# MaxNoOfLocalScans =
# [!] This parameter is used to calculate the number of locked records.
# This type of record is required to process many concurrent scan operations.
# The default value is 64. this value is closely related to the ScanBatchSize defined in the SQL node.
# BatchSizePerLocalScan =
# [!] The internal buffer used to transmit messages between a single node and a node.
# Although it almost does not need to be changed, it is still configurable. by default, it is set to 1 MB.
# LongMessageBuffer = 1 M
# [!] Set the REDO log file size of the node. the default value is 8.
# NoOfFragmentLogFiles = 8
# [!] Set the maximum number of trace files. the default value is 25.
# MaxNoOfSavedMessages = 25
# [!] Set the number of attributes that can be defined in the cluster. the default value is 1000 and the minimum value is 32.
# Maxnoofattribuckets = 1000
# [!] Sets the maximum number of table objects in the cluster. the default value is 128, the minimum value is 8, and the maximum value is 1600.
# MaxNoOfTables = 128
# [!] The default value is 128.
# MaxNoOfOrderedIndexes = 128
# [!] The default value of this parameter is 64.
# MaxNoOfUniqueHashIndexes = 64
# [!] This parameter is used to set the maximum number of triggers in the cluster.
# MaxNoOfTriggers = 768
# For many operating systems, the process can be locked in the memory to avoid switching with the disk.
# Use it to ensure the real-time features of the cluster.
# This feature is disabled by default (values: Y/N or 1/0)
# LockPagesInMainMemory = 0
# When an error occurs, this parameter specifies whether the NDBD process exits or automatically restarts.
# This feature is enabled by default (values: Y/N or 1/0)
# StopOnError = 1
# [!] The specified cluster is "no disk ".
# This feature is disabled by default (values: Y/N or 1/0)
# Diskless = 0
# [!] This feature can be accessed only when it is compiled as a debug version.
# This feature is disabled by default.
# RestartOnErrorInsert = 0
# [!] Specifies the interval between monitoring thread checks. this parameter is in milliseconds.
# The default value is 4000 milliseconds.
# Timebetweenwatchdogcheck= 4000
# [!] This parameter specifies the time when the cluster waits for all storage nodes to appear before the cluster initialization subroutine is called.
# The default value is 30000 milliseconds (0 indicates infinite timeout)
# StartPartialTimeout = 30000
# [!] If the cluster is ready for startup but may still be isolated, the cluster will wait until the timeout period ends.
# The default value is 60000 milliseconds.
# StartPartitionedTimeout = 60000
# [!] If the data node does not complete its startup sequence within the time specified by this parameter,
# Node startup will fail. If this parameter is set to 0, data node timeout is not used.
# The default value is 60000 milliseconds.
# StartFailureTimeout = 60000
# [!] Interval at which each data node sends a heartbeat signal to the SQL node.
# The default value is 1500 milliseconds.
# HeartbeatIntervalDbDb = 1500
# [!] The default value is 1500 Ms.
# HeartbeatIntervalDbApi = 1500
# [!] The default value is 20.
# TimeBetweenLocalCheckpoints = 20
# [!] This parameter defines the interval between global checkpoint operations.
# The default value is 2000 milliseconds.
# TimeBetweenGlobalCheckpoints = 2000
# [!] The default value is 1000 ms.
# TimeBetweenInactiveTransactionAbortCheck = 1000
# [!] If the transaction does not execute any query at present, it waits for further user input.
# This parameter indicates the maximum waiting time before the transaction is abandoned.
# The default value is 0.
# TransactionInactiveTimeout = 0
# [!] The timeout parameter specifies the time for the transaction coordinator to wait for another node to execute the query before the transaction is abandoned.
# TransactionDeadlockDetectionTimeout = 1200
# [!] This parameter specifies the speed at which local checkpoint operations are performed,
# It can be used with NoOfFragmentLogFiles, DataMemory, and IndexMemory.
# The default value is 40 (MB data page per second)
# NoOfDiskPagesToDiskAfterRestartTUP = 40
# The unit used by this parameter is the same as that used by NoOfDiskPagesToDiskAfterRestartTUP.
# The operation method is similar, but the speed of writing index pages from the index memory is limited.
# The default value of this parameter is 20 index memory pages per second (Mb per second)
# NoOfDiskPagesToDiskAfterRestartACC = 20
# [!] This parameter involves pages written from the data memory.
# The default value is 40 (3.2MB per second)
# NoOfDiskPagesToDiskDuringRestartTUP = 40
# [!] The default value of this parameter is 20 (1.6MB per second)
# NoOfDiskPagesToDiskDuringRestartACC = 20
# [!] Specifies the time for the data node to wait for the decision-making program to respond to the decision message.
# The default value is 1000 milliseconds.
# ArbitrationTimeout = 1000
# [!] Specify the size of the UNDO index buffer.
# The default value is 2 MB and the minimum value is 1 MB.
# UndoIndexBuffer = 2 M
# [!] Specify the size of the UNDO data buffer.
# The default value is 16 MB and the minimum value is 1 MB.
# UndoDataBuffer = 16 M
# [!] Specifies the size of the REDO data buffer.
# The default value is 8 MB and the minimum value is 1 MB.
# RedoBuffer = 8 M
# Log level, used for events generated during process startup.
# The default value is 1.
# LogLevelStartup = 1
# Log level, used as an event generated when the node properly closes the process component.
# The default value is 0.
# LogLevelShutdown = 0
# Log level, used to count events, such as the number of reads by the primary key method, number of updates, number of inserts,
# Information related to buffer usage.
# The default value is 0.
# LogLevelStatistic = 0
# Log level, used for events generated by local and global checkpoint operations.
# The default value is 0.
# LogLevelCheckpoint = 0
# Log level, used for events generated during node restart.
# The default value is 0.
# LogLevelNodeRestart = 0
# Log level, used for events generated by connections between cluster nodes.
# The default value is 0.
# LogLevelConnection = 0
# Log level, used for events generated by errors and warnings throughout the cluster.
# This type of error will not cause any node failure. it is still worth recording.
# The default value is 0.
# LogLevelError = 0
# Log level, used to generate events for general cluster status information.
# The default value is 0.
# LogLevelInfo = 0
# [!] Specifies the size of the data backup buffer.
# The default value is 2 MB.
# BackupDataBufferSize = 2 M
# [!] Specify the size of the log backup buffer.
# The default value is 2 MB.
# BackupLogBufferSize = 2 M
# This parameter is the sum of BackupDataBufferSize and BackupLogBufferSize.
# The default value is 2 MB + 2 MB = 4 MB.
# BackupMemory = 4 M
# This parameter specifies the size of messages written to the disk by backup log buffering and backup data buffering.
# The default value is 32 kB.
# BackupWriteSize = 32 k
######################################## ###################################
# Definition
MySQL server
(MYSQLD)
#
# Define the behavior of a MySQL server (SQL node) used to access cluster data
# * You can use [NDB_MGMD DEFAULT] to define the DEFAULT behavior of multiple management nodes.
######################################## ###################################
# [Mysqld default]
[MYSQLD]
# Unique ID of a node in the cluster. value range: 1 ~ 63
Id = 21
# Specify the node host name or IP address
HostName = 192.168.1.102
# Reference one of the computers defined in [COMPUTER]
# ExecuteOnComputer =
# For normal configuration, use the management server as the decision-making program.
# Set its ArbitrationRank to 1 (default ),
# Set ArbitrationRank of all SQL nodes to 0.
ArbitrationRank = 0
# Specify the latency of the management server for decision-making requests, in milliseconds. the default value is 0.
# Generally, you do not need to change it.
ArbitrationDelay = 0
# [!] This parameter is in bytes and the default value is 32 kB.
# BatchByteSize = 32 k
# [!] This parameter is in bytes. the default value is 64 and the maximum value is 992.
# BatchSize = 64
# [!] Specify the size of each batch of data sent from each data node.
# The default value is 256KB, and the maximum value is 16 MB.
# MaxScanBatchSize = 256 k
Refer:
Http://blog.csdn.net/chengfei112233/article/details/7705113