MySQL 5.7 Reference Manual Including MySQL NDB Cluster 7.5 and NDB Cluster 7.6

21.5.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.

Options that can be used with ndbd are shown in the following table. Additional descriptions follow the table.

Table 21.22 Command-line options used with the program ndbd

Format Description Added, Deprecated, or Removed

--bind-address=name

Local bind address

(Supported in all NDB releases based on MySQL 5.7)

--character-sets-dir=path

Directory containing character sets

(Supported in all NDB releases based on MySQL 5.7)

--connect-delay=#

Obsolete synonym for --connect-retry-delay, which should be used instead of this option

REMOVED: NDB 7.5.25, NDB 7.6.21

--connect-retries=#

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

(Supported in all NDB releases based on MySQL 5.7)

--connect-retry-delay=#

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

(Supported in all NDB releases based on MySQL 5.7)

--connect-string=connection_string,

-c connection_string

Same as --ndb-connectstring

(Supported in all NDB releases based on MySQL 5.7)

--core-file

Write core file on error; used in debugging

(Supported in all NDB releases based on MySQL 5.7)

--daemon,

-d

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

(Supported in all NDB releases based on MySQL 5.7)

--defaults-extra-file=path

Read given file after global files are read

(Supported in all NDB releases based on MySQL 5.7)

--defaults-file=path

Read default options from given file only

(Supported in all NDB releases based on MySQL 5.7)

--defaults-group-suffix=string

Also read groups with concat(group, suffix)

(Supported in all NDB releases based on MySQL 5.7)

--foreground

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

(Supported in all NDB releases based on MySQL 5.7)

--help,

-?

Display help text and exit

(Supported in all NDB releases based on MySQL 5.7)

--initial

Perform initial start of ndbd, including file system cleanup; consult documentation before using this option

(Supported in all NDB releases based on MySQL 5.7)

--initial-start

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

(Supported in all NDB releases based on MySQL 5.7)

--install[=name]

Used to install data node process as Windows service; does not apply on other platforms

(Supported in all NDB releases based on MySQL 5.7)

--logbuffer-size=#

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

ADDED: NDB 7.6.6

--login-path=path

Read given path from login file

(Supported in all NDB releases based on MySQL 5.7)

--ndb-connectstring=connection_string,

-c connection_string

Set connect string for connecting to ndb_mgmd. Syntax: "[nodeid=id;][host=]hostname[:port]". Overrides entries in NDB_CONNECTSTRING and my.cnf

(Supported in all NDB releases based on MySQL 5.7)

--ndb-mgmd-host=connection_string,

-c connection_string

Same as --ndb-connectstring

(Supported in all NDB releases based on MySQL 5.7)

--ndb-nodeid=#

Set node ID for this node, overriding any ID set by --ndb-connectstring

(Supported in all NDB releases based on MySQL 5.7)

--nodaemon

Do not start ndbd as daemon; provided for testing purposes

(Supported in all NDB releases based on MySQL 5.7)

--no-defaults

Do not read default options from any option file other than login file

(Supported in all NDB releases based on MySQL 5.7)

--nostart,

-n

Do not start ndbd immediately; ndbd waits for command to start from ndb_mgm

(Supported in all NDB releases based on MySQL 5.7)

--nowait-nodes=list

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

(Supported in all NDB releases based on MySQL 5.7)

--ndb-optimized-node-selection

Enable optimizations for selection of nodes for transactions. Enabled by default; use --skip-ndb-optimized-node-selection to disable

(Supported in all NDB releases based on MySQL 5.7)

--print-defaults

Print program argument list and exit

(Supported in all NDB releases based on MySQL 5.7)

--remove[=name]

Used to remove data node process that was previously installed as Windows service; does not apply on other platforms

(Supported in all NDB releases based on MySQL 5.7)

--usage,

-?

Display help text and exit; same as --help

(Supported in all NDB releases based on MySQL 5.7)

--verbose,

-v

Write extra debugging information to node log

(Supported in all NDB releases based on MySQL 5.7)

--version,

-V

Display version information and exit

(Supported in all NDB releases based on MySQL 5.7)


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.

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

See Section 21.4.3.3, “NDB Cluster Connection Strings”, for additional information about this issue. For more information about data node configuration parameters, see Section 21.4.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 5.7 in a production setting. See Section 21.2.7, “Known Limitations of NDB Cluster”.