Documentation Home
MySQL 9.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 40.0Mb
PDF (A4) - 40.1Mb
Man Pages (TGZ) - 259.0Kb
Man Pages (Zip) - 366.2Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb


MySQL 9.0 Reference Manual  / ...  / MySQL NDB Cluster 9.0  / NDB Cluster Programs  /  ndbmtd — The NDB Cluster Data Node Daemon (Multi-Threaded)

25.5.3 ndbmtd — The NDB Cluster Data Node Daemon (Multi-Threaded)

ndbmtd is a multithreaded version ofndbd, the process that is used to handle all the data in tables using theNDBCLUSTER storage engine.ndbmtd is intended for use on host computers having multiple CPU cores. Except where otherwise noted,ndbmtd functions in the same way asndbd; therefore, in this section, we concentrate on the ways in whichndbmtd differs fromndbd, and you should consultSection 25.5.1, “ndbd — The NDB Cluster Data Node Daemon”, for additional information about running NDB Cluster data nodes that apply to both the single-threaded and multithreaded versions of the data node process.

Command-line options and configuration parameters used withndbd also apply tondbmtd. For more information about these options and parameters, seeSection 25.5.1, “ndbd — The NDB Cluster Data Node Daemon”, andSection 25.4.3.6, “Defining NDB Cluster Data Nodes”, respectively.

ndbmtd is also file system-compatible withndbd. In other words, a data node runningndbd can be stopped, the binary replaced withndbmtd, and then restarted without any loss of data. (However, when doing this, you must make sure thatMaxNoOfExecutionThreads is set to an appropriate value before restarting the node if you wish forndbmtd to run in multithreaded fashion.) Similarly, anndbmtd binary can be replaced withndbd simply by stopping the node and then startingndbd in place of the multithreaded binary. It is not necessary when switching between the two to start the data node binary using--initial.

Usingndbmtd differs from usingndbd in two key respects:

  1. Becausendbmtd runs by default in single-threaded mode (that is, it behaves likendbd), you must configure it to use multiple threads. This can be done by setting an appropriate value in theconfig.ini file for theMaxNoOfExecutionThreads configuration parameter or theThreadConfig configuration parameter. UsingMaxNoOfExecutionThreads is simpler, butThreadConfig offers more flexibility. For more information about these configuration parameters and their use, seeMulti-Threading Configuration Parameters (ndbmtd).

  2. Trace files are generated by critical errors inndbmtd processes in a somewhat different fashion from how these are generated byndbd failures. These differences are discussed in more detail in the next few paragraphs.

Likendbd,ndbmtd generates a set of log files which are placed in the directory specified byDataDir in theconfig.ini configuration file. Except for trace files, these are generated in the same way and have the same names as those generated byndbd.

In the event of a critical error,ndbmtd generates trace files describing what happened just prior to the error' occurrence. These files, which can be found in the data node'sDataDir, are useful for analysis of problems by the NDB Cluster Development and Support teams. One trace file is generated for eachndbmtd thread. The names of these files have the following pattern:

ndb_node_id_trace.log.trace_id_tthread_id,

In this pattern,node_id stands for the data node's unique node ID in the cluster,trace_id is a trace sequence number, andthread_id is the thread ID. For example, in the event of the failure of anndbmtd process running as an NDB Cluster data node having the node ID 3 and withMaxNoOfExecutionThreads equal to 4, four trace files are generated in the data node's data directory. If the is the first time this node has failed, then these files are namedndb_3_trace.log.1_t1,ndb_3_trace.log.1_t2,ndb_3_trace.log.1_t3, andndb_3_trace.log.1_t4. Internally, these trace files follow the same format asndbd trace files.

Thendbd exit codes and messages that are generated when a data node process shuts down prematurely are also used byndbmtd. SeeData Node Error Messages, for a listing of these.

Note

It is possible to usendbd andndbmtd concurrently on different data nodes in the same NDB Cluster. However, such configurations have not been tested extensively; thus, we cannot recommend doing so in a production setting at this time.