2009-09-16 14:03:18 +02:00
'\" t
2009-05-25 11:59:47 +02:00
. \" Title: \fBndbmtd\fR
2009-09-16 14:03:18 +02:00
. \" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
. \" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
2010-04-28 15:06:11 +02:00
. \" Date: 04/06/2010
2009-05-25 11:59:47 +02:00
. \" Manual: MySQL Database System
. \" Source: MySQL 5.1
2009-09-16 14:03:18 +02:00
. \" Language: English
2009-05-25 11:59:47 +02:00
. \"
2010-04-28 15:06:11 +02:00
.TH "\FBNDBMTD\FR" "8" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
2009-09-16 14:03:18 +02:00
. \" -----------------------------------------------------------------
. \" * set default formatting
. \" -----------------------------------------------------------------
2009-05-25 11:59:47 +02:00
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
2009-09-16 14:03:18 +02:00
. \" -----------------------------------------------------------------
. \" * MAIN CONTENT STARTS HERE *
. \" -----------------------------------------------------------------
. \" ndbmtd
. \" MySQL Cluster: ndbmtd
. \" MySQL Cluster: data nodes
. \" data nodes (MySQL Cluster)
. \" storage nodes - see data nodes, ndbd, ndbmtd
2009-05-25 11:59:47 +02:00
.SH "NAME"
2009-09-16 14:03:18 +02:00
ndbmtd \- the MySQL Cluster data node daemon (multi\- threaded version)
2009-05-25 11:59:47 +02:00
.SH "SYNOPSIS"
2009-09-16 14:03:18 +02:00
.HP \w '\fBndbmtd\ \fR \fB \fI options\fR\fR\ 'u
2009-05-25 11:59:47 +02:00
\fB ndbmtd \fR \fB \fI options\fR \fR
.SH "DESCRIPTION"
.PP
\fB ndbmtd\fR
is a multi\- threaded version of
\fB ndbd\fR , the process that is used to handle all the data in tables using the
NDBCLUSTER
2009-09-16 14:03:18 +02:00
storage engine\& .
2009-05-25 11:59:47 +02:00
\fB ndbmtd\fR
2009-09-16 14:03:18 +02:00
is intended for use on host computers having multiple CPU cores\& . Except where otherwise noted,
2009-05-25 11:59:47 +02:00
\fB ndbmtd\fR
functions in the same way as
\fB ndbd\fR ; therefore, in this section, we concentrate on the ways in which
\fB ndbmtd\fR
differs from
\fB ndbd\fR , and you should consult
2009-09-16 14:03:18 +02:00
\fB ndbd\fR (8), for additional information about running MySQL Cluster data nodes that apply to both the single\- threaded and multi\- threaded versions of the data node process\& .
2009-05-25 11:59:47 +02:00
.PP
Command\- line options and configuration parameters used with
\fB ndbd\fR
also apply to
2009-09-16 14:03:18 +02:00
\fB ndbmtd\fR \& . For more information about these options and parameters, see
2009-12-01 08:24:05 +01:00
\fB ndbd\fR (8), and
Section\ \& 17.3.2.6, \(lq Defining MySQL Cluster Data Nodes\(rq , respectively\& .
2009-05-25 11:59:47 +02:00
.PP
\fB ndbmtd\fR
is also file system\- compatible with
2009-09-16 14:03:18 +02:00
\fB ndbd\fR \& . In other words, a data node running
2009-05-25 11:59:47 +02:00
\fB ndbd\fR
can be stopped, the binary replaced with
2009-09-16 14:03:18 +02:00
\fB ndbmtd\fR , and then restarted without any loss of data\& . (However, when doing this, you must make sure that
2009-05-25 11:59:47 +02:00
MaxNoOfExecutionThreads
is set to an apppriate value before restarting the node if you wish for
\fB ndbmtd\fR
2009-09-16 14:03:18 +02:00
to run in multi\- threaded fashion\& .) Similarly, an
2009-05-25 11:59:47 +02:00
\fB ndbmtd\fR
binary can be replaced with
\fB ndbd\fR
simply by stopping the node and then starting
\fB ndbd\fR
2009-09-16 14:03:18 +02:00
in place of the multi\- threaded binary\& . It is not necessary when switching between the two to start the data node binary using
\fB \- \- initial\fR \& .
.PP
2009-12-01 08:24:05 +01:00
Prior to MySQL Cluster NDB 7\& .0\& .6, there were known issues when using
2009-09-16 14:03:18 +02:00
\fB ndbmtd\fR
2009-12-01 08:24:05 +01:00
with MySQL Cluster Disk Data tables\& . If you wish to use multi\- threaded data nodes with disk\- based
NDB
2010-04-28 15:06:11 +02:00
tables, you should ensure that you are running MySQL Cluster NDB 7\& .0\& .6 or later\& . (\m[blue]\fBBug#41915\fR\m[]\&\s-2\u[1] \d \s +2,
2009-09-16 14:03:18 +02:00
\m[blue]\fBBug#44915\fR\m[]\&\s-2\u[2] \d \s +2)
2009-05-25 11:59:47 +02:00
.PP
Using
\fB ndbmtd\fR
differs from using
\fB ndbd\fR
in two key respects:
2009-09-16 14:03:18 +02:00
.sp
.RS 4
.ie n \{ \
\h '-04' 1.\h '+01'\c
. \}
.el \{ \
.sp -1
.IP " 1." 4 .2
. \}
2009-05-25 11:59:47 +02:00
You must set an appropriate value for the
MaxNoOfExecutionThreads
configuration parameter in the
2009-09-16 14:03:18 +02:00
config\& .ini
file\& . If you do not do so,
2009-05-25 11:59:47 +02:00
\fB ndbmtd\fR
runs in single\- threaded mode \(em that is, it behaves like
2009-09-16 14:03:18 +02:00
\fB ndbd\fR \& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04' 2.\h '+01'\c
. \}
.el \{ \
.sp -1
.IP " 2." 4 .2
. \}
2009-05-25 11:59:47 +02:00
Trace files are generated by critical errors in
\fB ndbmtd\fR
processes in a somewhat different fashion from how these are generated by
\fB ndbd\fR
2009-09-16 14:03:18 +02:00
failures\& .
2009-05-25 11:59:47 +02:00
.RE
.PP
2009-09-16 14:03:18 +02:00
These differences are discussed in more detail in the next few paragraphs\& .
2009-12-01 08:24:05 +01:00
. \" execution threads (MySQL Cluster)
. \" MySQL Cluster: execution threads
2009-09-16 14:03:18 +02:00
. \" ndbmtd: MaxNoOfExecutionThreads
. \" MaxNoOfExecutionThreads: ndbmtd
. \" ndbmtd: trace files
. \" trace files: ndbmtd
2009-05-25 11:59:47 +02:00
.PP
\fB Number of execution threads\fR . The
MaxNoOfExecutionThreads
configuration parameter is used to determine the number of local query handler (LQH) threads spawned by
2009-09-16 14:03:18 +02:00
\fB ndbmtd\fR \& . Although this parameter is set in
2009-05-25 11:59:47 +02:00
[ndbd]
or
[ndbd default]
sections of the
2009-09-16 14:03:18 +02:00
config\& .ini
2009-05-25 11:59:47 +02:00
file, it is exclusive to
\fB ndbmtd\fR
and does not apply to
2009-09-16 14:03:18 +02:00
\fB ndbd\fR \& .
2009-05-25 11:59:47 +02:00
.PP
2009-12-01 08:24:05 +01:00
This parameter takes an integer value from 2 to 8 inclusive\& . Generally, you should set this parameter equal to the number of CPU cores on the data node host, as shown in the following table:
2009-05-25 11:59:47 +02:00
.TS
allbox tab(:);
lB lB.
T{
Number of Cores
T}:T{
Recommended MaxNoOfExecutionThreads Value
T}
.T &
l l
l l
l l.
T{
2
T}:T{
2
T}
T{
4
T}:T{
4
T}
T{
8 or more
T}:T{
8
T}
.TE
2009-09-16 14:03:18 +02:00
.sp 1
2009-05-25 11:59:47 +02:00
.PP
(It is possible to set this parameter to other values within the permitted range, but these are automatically rounded as shown in the
\fB Value Used\fR
2009-09-16 14:03:18 +02:00
column of the next table in this section\& .)
2009-05-25 11:59:47 +02:00
.PP
The multi\- threaded data node process always spawns at least 4 threads:
2009-09-16 14:03:18 +02:00
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
1 local query handler (LQH) thread
2009-09-16 14:03:18 +02:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
1 transaction coordinator (TC) thread
2009-09-16 14:03:18 +02:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
1 transporter thread
2009-09-16 14:03:18 +02:00
.RE
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
1 subscription manager (SUMA) thread
2009-05-25 11:59:47 +02:00
.RE
.PP
Setting this parameter to a value between 4 and 8 inclusive causes additional LQH threads to be used by
\fB ndbmtd\fR
(up to a maximum of 4 LQH threads), as shown in the following table:
.TS
allbox tab(:);
lB lB lB.
T{
2009-09-16 14:03:18 +02:00
config\& .ini Value
2009-05-25 11:59:47 +02:00
T}:T{
Value Used
T}:T{
Number of LQH Threads Used
T}
.T &
l l l
l l l
l l l.
T{
3
T}:T{
2
T}:T{
1
T}
T{
5 or 6
T}:T{
4
T}:T{
2
T}
T{
7
T}:T{
8
T}:T{
4
T}
.TE
2009-09-16 14:03:18 +02:00
.sp 1
2009-05-25 11:59:47 +02:00
.PP
Setting this parameter outside the permitted range of values causes the management server to abort on startup with the error
2009-09-16 14:03:18 +02:00
Error line \fI number\fR : Illegal value \fI value\fR for parameter MaxNoOfExecutionThreads\& .
.if n \{ \
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
. \}
.RS 4
2009-05-25 11:59:47 +02:00
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
2009-09-16 14:03:18 +02:00
.ps +1
2009-05-25 11:59:47 +02:00
\fB Note\fR
2009-09-16 14:03:18 +02:00
.ps -1
.br
2009-05-25 11:59:47 +02:00
.PP
2009-09-16 14:03:18 +02:00
In MySQL Cluster NDB 6\& .4\& .0, it is not possible to set
2009-05-25 11:59:47 +02:00
MaxNoOfExecutionThreads
2009-09-16 14:03:18 +02:00
to 2\& . You can safely use the value 3 instead (it is treated as 2 internally)\& . This issue is resolved in MySQL Cluster NDB 6\& .4\& .1\& .
.sp .5v
.RE
2009-05-25 11:59:47 +02:00
.PP
2009-09-16 14:03:18 +02:00
In MySQL Cluster NDB 6\& .4\& .0 through 6\& .4\& .3, the default value for this parameter was undefined, although the default behavior for
2009-05-25 11:59:47 +02:00
\fB ndbmtd\fR
was to use 1 LQH thread, as though
MaxNoOfExecutionThreads
2009-09-16 14:03:18 +02:00
had been set to 2\& . Beginning with MySQL Cluster NDB 7\& .0\& .4, this parameter has an explcit default value of 2, thus guaranteeing this default behavior\& .
2009-05-25 11:59:47 +02:00
.PP
2009-09-16 14:03:18 +02:00
In MySQL Cluster NDB 7\& .0, it is not possible to cause
2009-05-25 11:59:47 +02:00
\fB ndbmtd\fR
2009-09-16 14:03:18 +02:00
to use more than 1 TC thread, although we plan to introduce this capability in a future MySQL Cluster release series\& .
. \" MySQL Cluster: log files
. \" log files (MySQL Cluster): ndbmtd
. \" ndbmtd: trace files
2009-05-25 11:59:47 +02:00
.PP
Like
\fB ndbd\fR ,
\fB ndbmtd\fR
generates a set of log files which are placed in the directory specified by
DataDir
in the
2009-09-16 14:03:18 +02:00
config\& .ini
configuration file\& . Except for trace files, these are generated in the same way and have the same names as those generated by
\fB ndbd\fR \& .
2009-05-25 11:59:47 +02:00
.PP
In the event of a critical error,
\fB ndbmtd\fR
2009-09-16 14:03:18 +02:00
generates trace files describing what happened just prior to the error\' occurrence\& . These files, which can be found in the data node\' s
DataDir, are useful for analysis of problems by the MySQL Cluster Development and Support teams\& . One trace file is generated for each
2009-05-25 11:59:47 +02:00
\fB ndbmtd\fR
2009-09-16 14:03:18 +02:00
thread\& . The names of these files follow the pattern
ndb_\fI node_id\fR _trace\& .log\& .\fI trace_id\fR _t\fI thread_id\fR , where
2009-05-25 11:59:47 +02:00
\fI node_id\fR
2009-09-16 14:03:18 +02:00
is the data node\' s unique node ID in the cluster,
2009-05-25 11:59:47 +02:00
\fI trace_id\fR
is a trace sequence number, and
\fI thread_id\fR
2009-09-16 14:03:18 +02:00
is the thread ID\& . For example, in the event of the failure of an
2009-05-25 11:59:47 +02:00
\fB ndbmtd\fR
process running as a MySQL Cluster data node having the node ID 3 and with
MaxNoOfExecutionThreads
2009-09-16 14:03:18 +02:00
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 named
ndb_3_trace\& .log\& .1_t1,
ndb_3_trace\& .log\& .1_t2,
ndb_3_trace\& .log\& .1_t3, and
ndb_3_trace\& .log\& .1_t4\& . Internally, these trace files follow the same format as
2009-05-25 11:59:47 +02:00
\fB ndbd\fR
2009-09-16 14:03:18 +02:00
trace files\& .
2009-05-25 11:59:47 +02:00
.PP
The
\fB ndbd\fR
exit codes and messages that are generated when a data node process shuts down prematurely are also used by
2009-09-16 14:03:18 +02:00
\fB ndbmtd\fR \& . See
\m[blue]\fBndbd Error Messages\fR\m[]\&\s-2\u[3] \d \s +2, for a listing of these\& .
.if n \{ \
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
. \}
.RS 4
2009-05-25 11:59:47 +02:00
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
2009-09-16 14:03:18 +02:00
.ps +1
2009-05-25 11:59:47 +02:00
\fB Note\fR
2009-09-16 14:03:18 +02:00
.ps -1
.br
2009-05-25 11:59:47 +02:00
.PP
It is possible to use
\fB ndbd\fR
and
\fB ndbmtd\fR
2009-09-16 14:03:18 +02:00
concurrently on different data nodes in the same MySQL Cluster\& . However, such configurations have not been tested extensively; thus, we cannot not recommend doing so in a production setting at this time\& .
.sp .5v
.RE
2009-05-25 11:59:47 +02:00
.SH "COPYRIGHT"
2009-09-16 14:03:18 +02:00
.br
2009-05-25 11:59:47 +02:00
.PP
2010-04-28 15:06:11 +02:00
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
2009-05-25 11:59:47 +02:00
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
.PP
2009-09-16 14:03:18 +02:00
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "NOTES"
.IP " 1." 4
Bug#41915
.RS 4
2010-04-28 15:06:11 +02:00
\% http://bugs.mysql.com/bug.php?id=41915
2009-09-16 14:03:18 +02:00
.RE
.IP " 2." 4
Bug#44915
.RS 4
2010-04-28 15:06:11 +02:00
\% http://bugs.mysql.com/bug.php?id=44915
2009-09-16 14:03:18 +02:00
.RE
.IP " 3." 4
ndbd Error Messages
.RS 4
\% http://dev.mysql.com/doc/ndbapi/en/ndbd-error-messages.html
.RE
2009-05-25 11:59:47 +02:00
.SH "SEE ALSO"
For more information, please refer to the MySQL Reference Manual,
which may already be installed locally and which is also available
online at http://dev.mysql.com/doc/.
.SH AUTHOR
2009-09-16 14:03:18 +02:00
Sun Microsystems, Inc. (http://www.mysql.com/).