Mysql cluster management node configuration file Detailed

First, the definition of MySQL Cluster TCP / IP connections
TCP / IP is used to establish the default MySQL Cluster transport protocol connection normally be necessary to define the connection. Using "[TCP DEFAULT]" or "[TCP]" is defined.

SendBufferMemory 1.
TCP transmit buffer. The default value is 256KB.

SendSignalId 2.
ID message transmitted over the network. This feature is disabled by default (value: Y / N or 1/0).

3. Checksum
Enable This parameter will be placed in all messages before transmission buffer, calculating a checksum for all parameters. This feature is disabled by default (value: Y / N or 1/0).

4. ReceiveBufferMemory
specified buffer size from the TCP / IP Socket used when data is received. Almost no change of the parameter default values, the default value is 64KB.

Second, the default behavior of the node definition data
NoOfReplicas is necessary parameters, "[NDBD DEFAULT]" is defined.

1. NoOfReplicas
define the cluster copy number stored in each table, and also specify the size of the group of nodes. It refers to a group of nodes stored in the node information of the same set. Specified value for this parameter is not normally required. NoOfReplicas no default value, the maximum possible value of 4.

Third, the definition management server (MGM)
for the behavior of the configuration management server. The following parameters can be ignored, and if so, will use its default value. If not defined ExecuteOnComputer or HostName, will be designated as localhost. Using "[NDB_MGMD]" defines the behavior of a single management node can also use the "[NDB_MGMD DEFAULT]" default behavior define multiple managed nodes.

1. NodeId
uniquely identifies the cluster nodes, ranging from 1 to 63.

2. HostName
specified node host name or IP.

3. ExecuteOnComputer
reference to one of the computers defined in the "[COMPUTER]" section.

4. PortNumber
management server listening port (default: 2202).

5. LogDestination
node log out treatment, preferably the following values:
   . 5.1 the CONSOLE
         the log output to the standard output device (stdout).
   5.2 SYSLOG:. Facility = syslog
         send logs to the syslog (system log) soft equipment, possible values:
         the auth, authPriv, the cron, daemon, FTP, Kern, LPR, mail, News, the syslog
         , User, UUCP, of local0, local12 ~ . 7
   5.3 the fILE:. filename = / var / log / mgmd.log, MAXSIZE = 1000000, the maxfiles. 6 =
         talk log output to a file, can be specified at values:
         filename: log file name.
         maxsize: The maximum size of the log file, automatically create a new log file is larger than this size.
         maxfiles: The maximum number of log files.

6. ArbitrationRank
specify which nodes play the role of decision-making, only MGM nodes and SQL nodes can be used (default: 1). Typically, the value should be set to 1, and all SQL nodes to 0 to MGM server as a decision-making process. Preferably one of the following values:
   0: The node will never have to make decisions.
   1: the node having a high priority.
   2: the node has a limited low level.

7. ArbitrationDelay
specify the management server requests the decision delay time, in milliseconds, the default is 0. Under normal circumstances no need to change it.

8. DataDir
location to save the output file server management, including logging, process output files, pid files and programs. For log files, it can be covered by setting the FILE parameter LogDestination.

Fourth, the node definition data (NDBD)
to configure the behavior of data nodes. ExecuteOnComputer or HostName parameter is necessary. For various parameters, can use the suffix k, M or G units specified. Use "[NDBD]" is defined.

1. NodeId
start node can be assigned ID (i.e., data node ID) on the command line, you can be allocated in the configuration file.

2. HostName
specified node host name or IP.

3. ExecuteOnComputer
reference to one of the computers defined in the "[COMPUTER]" section.

4. DataDir
specify where trace files, directories, log files, pid files and error logs.

5. BackupDataDir
specify where the backup directory, the default is {FileSystemPath} / BACKUP.

6. DataMemory
designation data memory, the default is 80MB, the minimum value of 1MB, no size limit.

7. IndexMemory
specified index memory, the default is 18MB, the minimum value of 1MB, no size limit.

8. MaxNoOfConcurrentTransactions
for the number of possible nodes within a set of concurrent transactions, the default value is 4096. For all nodes, the parameter must be set to the same value.

9. MaxNoOfConcurrentOperations
provided simultaneously appear in the number of records or update phase locked simultaneously. The default value is 32768.

10. MaxNoOfLocalOperations
default, calculated as 1.1 * MaxNoOfConcurrentOperations the parameter which is adapted to have many concurrent transactions, but the system does not exist large transaction. If you need to process large transaction at a time, and there are many nodes, preferably by explicitly specifying this parameter to override the default values.

11. MaxNoOfConcurrentIndexOperations
default value for this parameter is 8192. Only in very rare cases, you need to perform extremely high parallelism using unique hash indexes should it be necessary to increase this value. If satisfied that the cluster does not require high parallelism, and a smaller value may be used to save memory.

12. MaxNoOfFiredTriggers
default is 4000, which is sufficient for most situations. In some cases, if you believe in a cluster of parallel operations is not high, and even reduce it.

13. TransactionBufferMemory
This parameter affects memory for performing the operations of the tracking index table and updates the read unique index. The memory is used to store the key and column information for these operations. Almost do not need to change the parameter default values.

14. MaxNoOfConcurrentScans
This parameter is used to control the number of parallel scans can be performed in the cluster. The default value is 256 and the maximum is 500.

15. MaxNoOfLocalScans
if many scans are not fully parallelized, the number of records specified local scan.

16. BatchSizePerLocalScan
This parameter is used to calculate the number of lock records. To handle many concurrent scan operations such records. The default value is 64, the value defined in SQL node ScanBatchSize close.

17. LongMessageBuffer
used between a single node and the node transmitting the message internal buffer. Although almost no need to change it, but it still is configurable. By default, it is set to 1MB.

18. NoOfFragmentLogFiles
set node REDO log file size, default is 8.

19. MaxNoOfSavedMessages
set the maximum number of trace files, the default is 25.

20. MaxNoOfAttributes
set number of attributes can be defined in the cluster, the default value 1000, the minimum is 32.

21. MaxNoOfTables
set the maximum number of table objects in the cluster. The default value is 128, the minimum is 8, the maximum value is 1600.

22. MaxNoOfOrderedIndexes
for each ordered cluster index, will allocate an object that describes the content index, and its storage segment. By default, each index so defined also defines an ordered index. Each unique index and primary keys have an ordered index and a hash index. The total number of MaxNoOfOrderedIndexes ordered index set, which is the total number of ordered indices system can be used at any time. The default value for this parameter is 128. Each index of each node in the object size is about 10KB.

23. MaxNoOfUniqueHashIndexes
for each unique index is not the primary key, you will be allocated a table, for mapping the unique key to the primary key of the index table. By default, there will be a sorted index for each unique index definition. Want to avoid this situation, when defining the unique index, you must also specify "USING HASH" option. The default value is 64. The size of each index of each node is approximately 15KB.

24. MaxNoOfTriggers
This parameter is used to set the maximum number of flip-flops in the cluster.

25. LockPagesInMainMemory
For many operating systems, the process can be locked in memory, in order to avoid any swapping to disk. Use it to ensure the real-time nature of clusters. By default, this feature is disabled (value: Y / N or 1/0).

26. StopOnError
when an error occurs, this parameter specifies NDBD process is to exit or reboot automatically. By default, this feature is enabled (value: Y / N or 1/0).

27. Diskless
designated cluster is "diskless" means no table set up checkpoints on the disk, it will not record any log. By default, this feature is disabled (value: Y / N or 1/0).

28. RestartOnErrorInsert
only when compiling debug version to access this feature. By default, this feature is disabled.

29. TimeBetweenWatchDogCheck
specified interval monitor thread checks. The parameter in milliseconds, the default value is 4000 milliseconds.

30. StartPartialTimeout
This parameter specifies the initialization routine before calling the cluster, the cluster storage nodes wait for all the time that appears. The default value is 30000 milliseconds (0 indicates an infinite timeout).

31. StartPartitionedTimeout
If the cluster is ready to start, but still possibly in a partitioned state, the cluster waits until this timeout has also passed. The default value is 60000 milliseconds.

32. StartFailureTimeout
If the data is not completed within the node parameter specifies the time that the start-up sequence, the node will fail to start. If this parameter is set to 0 means that no data node timeout. The default value is 60000 milliseconds.

33. HeartbeatIntervalDbDb
each node transmits data to the heartbeat interval SQL node. The default value is 1500 milliseconds.

34. HeartbeatIntervalDbApi
Each data node sends out a heartbeat signal to each MySQL server (SQL node) to ensure that they remain in contact. If a MySQL server fails to successfully send a heartbeat in time, it will be declared as "invalid", in this case, all ongoing transactions are completed, and the release of all resources. SQL node can not reconnect, until all the activities from the previous MySQL instance initialization have been completed so far. The default time interval is 1500 milliseconds (1.5 seconds) between the time interval which a single node can be different, since each node will monitor the data MySQL servers connected thereto, independent of all other data nodes.

35. TimeBetweenLocalCheckpoints
the default parameter value 20.

36. TimeBetweenGlobalCheckpoints
This parameter defines the time between global checkpoint operations. The default value is 2000 milliseconds.

37. TimeBetweenInactiveTransactionAbortCheck
This parameter defaults to 1000 milliseconds.

38. TransactionInactiveTimeout
If the transaction is currently not performing any queries but is waiting for further user input, this parameter specifies the maximum time a transaction before giving up the user can wait. The default value is 0.

39. TransactionDeadlockDetectionTimeout
before the timeout parameter specifies abandon the transaction, the transaction coordinator wait another node execution time of the query.

40. NoOfDiskPagesToDiskAfterRestartTUP
This parameter specifies the speed of a local checkpoint operation, and can be used with NoOfFragmentLogFiles, DataMemory and IndexMemory. The default value is 40 (3.2MB per second data page).

41. NoOfDiskPagesToDiskAfterRestartACC
same units NoOfDiskPagesToDiskAfterRestartTUP the parameters used. Work is similar, but the limit is the index page write speed from the index memory. The default value of the parameter index per 20 memory pages (1.6MB per second).

42. NoOfDiskPagesToDiskDuringRestartTUP
This parameter relates to data written from the page memory. The default value is 40 (3.2MB per second).

43. NoOfDiskPagesToDiskDuringRestartACC
The parameter default value is 20 (1.6MB per second).

44. ArbitrationTimeout
designating data decision node waits a response from the decision message of the time. The default value is 1000 milliseconds.

45. UndoIndexBuffer
designated UNDO index buffer size. The default value is 2MB, the minimum value of 1MB.

46. UndoDataBuffer
designated UNDO data buffer size. The default is 16MB, the minimum value of 1MB.

47. RedoBuffer
specify REDO data buffer size. The default value is 8MB, the minimum value of 1MB.

48. LogLevelStartup
log level for events generated during startup process of. The default level is 1.

49. LogLevelShutdown
log level for a graceful shutdown of a node generates an integral part of the event. The default level is 0.

50. LogLevelStatistic
log level for statistical events, such as the number of primary key read, update number, the number of insertion, and the buffer and other information related to use. The default level is 0.

51. LogLevelCheckpoint
logging level for events local and global checkpoints generated. The default level is 0.

52. LogLevelNodeRestart
log level, the node for events generated during the restart. The default level is 0.

53. LogLevelConnection
log level for events generated by the connections between the cluster nodes. The default level is 0.

54. LogLevelError
log level for events generated by errors and warnings throughout the cluster. Such errors do not cause any node failure, but still worthy of recording. The default level is 0.

55. LogLevelInfo
log level for the general state of the cluster information generated events. The default level is 0

56. BackupDataBufferSize
specified data backup buffer size. The default value is 2MB.

57. BackupLogBufferSize
specified log backup buffer size. The default value is 2MB.

58. BackupMemory
This parameter is BackupDataBufferSize and BackupLogBufferSize sum. The default value is 2MB + 2MB = 4MB.

59. BackupWriteSize
This parameter specifies the buffer is written by the backup log disks and backup data buffers message size. The default is 32KB.

60. FileSystemPath
This parameter specifies the directory where all files created for metadata, REDO logs, UNDO logs and data files. Note: Before starting the ndbd process, the directory must already exist.

Fifth, the definition of MySQL server (SQL)
Defines the cluster data access behavior of MySQL server (SQL node) of. Using "[MYSQLD]" SQL nodes define individual behavior, may also be used "[MYSQLD DEFAULT]" SQL default behavior define multiple nodes.

1. NodeId
cluster node unique identification point. Ranging from 1 to 63.

2. HostName
specified node host name or IP.

3. ExecuteOnComputer
reference to one of the computers defined in the "[COMPUTER]" section.

4. ArbitrationRank
for normal configuration uses the management server as a decision-making process. The management server ArbitrationRank set to 1 (the default), and set all nodes to the SQL ArbitrationRank 0.

5. ArbitrationDelay
designated management server the decision request delay time, in milliseconds. The default is 0, usually no need to change it.

6. BatchByteSize
to be converted to a full table scan or index range scan query, the batch size to obtain a suitable record, can get the best performance. The suitable size may be represented by the number of records (BatchSize), it may also be represented by the number of bytes (BatchByteSize). The actual batch size is limited by these two parameters. According to this parameter setting method, can improve query performance up to 40%. The parameter bytes, the default value is 32KB.

7. BatchSize
the parameter bytes, the default value is 64, the maximum value is 992.

8. MaxScanBatchSize
designated batch of data transmitted from each node of the size of the data, the default value is 256KB, a maximum of 16MB.

Six sample configuration file
[ndbd default] # default data node configuration
NoOfReplicas = 2 # having two copies of the data in the cluster
DataMemory = 80M # MB data memory size is 80
IndexMemory are = # 18M memory size is 18 MB index

[ndb_mgmd] # managed node configuration
the NodeId. 1 =
hostname the IP address 192.168.124.141 # = management node
location datadir = / var / lib / mysql -cluster # storage management file output node

[ndbd] # configuration data node
the NodeId = 2
the IP address hostname = 192.168.124.142 # data node
datadir = / usr / local / mysql / data # specify where trace files, log files, pid error log files and directories

[ndbd] # configuration data node
the NodeId. 3 =
the IP address hostname = 192.168.124.143 # data node
datadir = / usr / local / mysql / data

[mysqld] # SQL node configuration
the NodeId. 4 =
hostname = the IP address 192.168.124.144 # SQL node

[mysqld] # Configure SQL node
NodeId = 5
hostname = 192.168.124.145 # SQL node IP address
----------------
Disclaimer: This article is CSDN bloggers' Bean_Young "the original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/yang1982_0907/article/details/21090437

Guess you like

Origin www.cnblogs.com/guipeng/p/11830798.html