MySQL 8.0 Reference Manual Including MySQL NDB Cluster 8.0

22.4.1 ndbd — The NDB Cluster Data Node Daemon

ndbd is the process that is used to handle all the data in tables using the NDB Cluster storage engine. This is the process that empowers a data node to accomplish distributed transaction handling, node recovery, checkpointing to disk, online backup, and related tasks.

In an NDB Cluster, a set of ndbd processes cooperate in handling data. These processes can execute on the same computer (host) or on different computers. The correspondences between data nodes and Cluster hosts is completely configurable.

The following table includes command options specific to the NDB Cluster data node program ndbd. Additional descriptions follow the table. For options common to most NDB Cluster programs (including ndbd), see Section 22.4.31, “Options Common to NDB Cluster Programs — Options Common to NDB Cluster Programs”.

Table 22.279 Command-line options for the ndbd program

Format Description Added, Deprecated, or Removed

--bind-address=name

Local bind address

All NDB 8.0 releases

--connect-delay=#

Time to wait between attempts to contact a management server, in seconds; 0 means do not wait between attempts

All NDB 8.0 releases

--connect-retries=#

Set the number of times to retry a connection before giving up; 0 means 1 attempt only (and no retries)

All NDB 8.0 releases

--connect-retry-delay=#

Time to wait between attempts to contact a management server, in seconds; 0 means do not wait between attempts

All NDB 8.0 releases

--daemon,

-d

Start ndbd as daemon (default); override with --nodaemon

All NDB 8.0 releases

--foreground

Run ndbd in foreground, provided for debugging purposes (implies --nodaemon)

All NDB 8.0 releases

--initial

Perform initial start of ndbd, including cleaning the file system. Consult the documentation before using this option

All NDB 8.0 releases

--initial-start

Perform partial initial start (requires --nowait-nodes)

All NDB 8.0 releases

--install[=name]

Used to install the data node process as a Windows service. Does not apply on non-Windows platforms.

All NDB 8.0 releases

--logbuffer-size=#

Control size of log buffer. For use when debugging with many log messages being generated; default is sufficient for normal operations.

All NDB 8.0 releases

--nostart,

-n

Don't start ndbd immediately; ndbd waits for command to start from ndb_mgmd

All NDB 8.0 releases

--nodaemon

Do not start ndbd as daemon; provided for testing purposes

All NDB 8.0 releases

--nowait-nodes=list

Do not wait for these data nodes to start (takes comma-separated list of node IDs). Also requires --ndb-nodeid to be used.

All NDB 8.0 releases

--remove[=name]

Used to remove a data node process that was previously installed as a Windows service. Does not apply on non-Windows platforms.

All NDB 8.0 releases

--verbose,

-v

Causes the data log to write extra debugging information to the node log.

All NDB 8.0 releases


Note

All of these options also apply to the multithreaded version of this program (ndbmtd) and you may substitute ndbmtd for ndbd wherever the latter occurs in this section.

ndbd generates a set of log files which are placed in the directory specified by DataDir in the config.ini configuration file.

These log files are listed below. node_id is and represents the node's unique identifier. For example, ndb_2_error.log is the error log generated by the data node whose node ID is 2.

It is recommended not to use a directory mounted through NFS because in some environments this can cause problems whereby the lock on the .pid file remains in effect even after the process has terminated.

To start ndbd, it may also be necessary to specify the host name of the management server and the port on which it is listening. Optionally, one may also specify the node ID that the process is to use.

shell> ndbd --connect-string="nodeid=2;host=ndb_mgmd.mysql.com:1186"

See Section 22.3.3.3, “NDB Cluster Connection Strings”, for additional information about this issue. Section 22.4.31, “Options Common to NDB Cluster Programs — Options Common to NDB Cluster Programs”, describes other command-line options which can be used with ndbd. For information about data node configuration parameters, see Section 22.3.3.6, “Defining NDB Cluster Data Nodes”.

When ndbd starts, it actually initiates two processes. The first of these is called the angel process; its only job is to discover when the execution process has been completed, and then to restart the ndbd process if it is configured to do so. Thus, if you attempt to kill ndbd using the Unix kill command, it is necessary to kill both processes, beginning with the angel process. The preferred method of terminating an ndbd process is to use the management client and stop the process from there.

The execution process uses one thread for reading, writing, and scanning data, as well as all other activities. This thread is implemented asynchronously so that it can easily handle thousands of concurrent actions. In addition, a watch-dog thread supervises the execution thread to make sure that it does not hang in an endless loop. A pool of threads handles file I/O, with each thread able to handle one open file. Threads can also be used for transporter connections by the transporters in the ndbd process. In a multi-processor system performing a large number of operations (including updates), the ndbd process can consume up to 2 CPUs if permitted to do so.

For a machine with many CPUs it is possible to use several ndbd processes which belong to different node groups; however, such a configuration is still considered experimental and is not supported for MySQL 8.0 in a production setting. See Section 22.1.7, “Known Limitations of NDB Cluster”.