ndbmtd.8 10.1 KB
Newer Older
1
'\" t
2
.\"     Title: \fBndbmtd\fR
3 4
.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5
.\"      Date: 04/06/2010
6 7
.\"    Manual: MySQL Database System
.\"    Source: MySQL 5.1
8
.\"  Language: English
9
.\"
10
.TH "\FBNDBMTD\FR" "8" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
11 12 13
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
14 15 16 17
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
18 19 20 21 22 23 24 25
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.\" ndbmtd
.\" MySQL Cluster: ndbmtd
.\" MySQL Cluster: data nodes
.\" data nodes (MySQL Cluster)
.\" storage nodes - see data nodes, ndbd, ndbmtd
26
.SH "NAME"
27
ndbmtd \- the MySQL Cluster data node daemon (multi\-threaded version)
28
.SH "SYNOPSIS"
29
.HP \w'\fBndbmtd\ \fR\fB\fIoptions\fR\fR\ 'u
30 31 32 33 34 35 36
\fBndbmtd \fR\fB\fIoptions\fR\fR
.SH "DESCRIPTION"
.PP
\fBndbmtd\fR
is a multi\-threaded version of
\fBndbd\fR, the process that is used to handle all the data in tables using the
NDBCLUSTER
37
storage engine\&.
38
\fBndbmtd\fR
39
is intended for use on host computers having multiple CPU cores\&. Except where otherwise noted,
40 41 42 43 44 45
\fBndbmtd\fR
functions in the same way as
\fBndbd\fR; therefore, in this section, we concentrate on the ways in which
\fBndbmtd\fR
differs from
\fBndbd\fR, and you should consult
46
\fBndbd\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\&.
47 48 49 50
.PP
Command\-line options and configuration parameters used with
\fBndbd\fR
also apply to
51
\fBndbmtd\fR\&. For more information about these options and parameters, see
52 53
\fBndbd\fR(8), and
Section\ \&17.3.2.6, \(lqDefining MySQL Cluster Data Nodes\(rq, respectively\&.
54 55 56
.PP
\fBndbmtd\fR
is also file system\-compatible with
57
\fBndbd\fR\&. In other words, a data node running
58 59
\fBndbd\fR
can be stopped, the binary replaced with
60
\fBndbmtd\fR, and then restarted without any loss of data\&. (However, when doing this, you must make sure that
61 62 63
MaxNoOfExecutionThreads
is set to an apppriate value before restarting the node if you wish for
\fBndbmtd\fR
64
to run in multi\-threaded fashion\&.) Similarly, an
65 66 67 68 69
\fBndbmtd\fR
binary can be replaced with
\fBndbd\fR
simply by stopping the node and then starting
\fBndbd\fR
70 71 72
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
73
Prior to MySQL Cluster NDB 7\&.0\&.6, there were known issues when using
74
\fBndbmtd\fR
75 76
with MySQL Cluster Disk Data tables\&. If you wish to use multi\-threaded data nodes with disk\-based
NDB
77
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,
78
\m[blue]\fBBug#44915\fR\m[]\&\s-2\u[2]\d\s+2)
79 80 81 82 83 84
.PP
Using
\fBndbmtd\fR
differs from using
\fBndbd\fR
in two key respects:
85 86 87 88 89 90 91 92 93
.sp
.RS 4
.ie n \{\
\h'-04' 1.\h'+01'\c
.\}
.el \{\
.sp -1
.IP "  1." 4.2
.\}
94 95 96
You must set an appropriate value for the
MaxNoOfExecutionThreads
configuration parameter in the
97 98
config\&.ini
file\&. If you do not do so,
99 100
\fBndbmtd\fR
runs in single\-threaded mode \(em that is, it behaves like
101 102 103 104 105 106 107 108 109 110 111
\fBndbd\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 2.\h'+01'\c
.\}
.el \{\
.sp -1
.IP "  2." 4.2
.\}
112 113 114 115
Trace files are generated by critical errors in
\fBndbmtd\fR
processes in a somewhat different fashion from how these are generated by
\fBndbd\fR
116
failures\&.
117 118
.RE
.PP
119
These differences are discussed in more detail in the next few paragraphs\&.
120 121
.\" execution threads (MySQL Cluster)
.\" MySQL Cluster: execution threads
122 123 124 125
.\" ndbmtd: MaxNoOfExecutionThreads
.\" MaxNoOfExecutionThreads: ndbmtd
.\" ndbmtd: trace files
.\" trace files: ndbmtd
126 127 128 129
.PP
\fBNumber of execution threads\fR. The
MaxNoOfExecutionThreads
configuration parameter is used to determine the number of local query handler (LQH) threads spawned by
130
\fBndbmtd\fR\&. Although this parameter is set in
131 132 133 134
[ndbd]
or
[ndbd default]
sections of the
135
config\&.ini
136 137 138
file, it is exclusive to
\fBndbmtd\fR
and does not apply to
139
\fBndbd\fR\&.
140
.PP
141
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:
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
.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
170
.sp 1
171 172 173
.PP
(It is possible to set this parameter to other values within the permitted range, but these are automatically rounded as shown in the
\fBValue Used\fR
174
column of the next table in this section\&.)
175 176
.PP
The multi\-threaded data node process always spawns at least 4 threads:
177 178 179 180 181 182 183 184 185
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
186
1 local query handler (LQH) thread
187 188 189 190 191 192 193 194 195 196
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
197
1 transaction coordinator (TC) thread
198 199 200 201 202 203 204 205 206 207
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
208
1 transporter thread
209
.RE
210
.sp
211 212 213 214 215 216 217 218 219
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
1 subscription manager (SUMA) thread
220 221 222 223 224 225 226 227 228
.RE
.PP
Setting this parameter to a value between 4 and 8 inclusive causes additional LQH threads to be used by
\fBndbmtd\fR
(up to a maximum of 4 LQH threads), as shown in the following table:
.TS
allbox tab(:);
lB lB lB.
T{
229
config\&.ini Value
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
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
261
.sp 1
262 263
.PP
Setting this parameter outside the permitted range of values causes the management server to abort on startup with the error
264 265
Error line \fInumber\fR: Illegal value \fIvalue\fR for parameter MaxNoOfExecutionThreads\&.
.if n \{\
266
.sp
267 268
.\}
.RS 4
269 270 271 272
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
273
.ps +1
274
\fBNote\fR
275 276
.ps -1
.br
277
.PP
278
In MySQL Cluster NDB 6\&.4\&.0, it is not possible to set
279
MaxNoOfExecutionThreads
280 281 282
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
283
.PP
284
In MySQL Cluster NDB 6\&.4\&.0 through 6\&.4\&.3, the default value for this parameter was undefined, although the default behavior for
285 286 287
\fBndbmtd\fR
was to use 1 LQH thread, as though
MaxNoOfExecutionThreads
288
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\&.
289
.PP
290
In MySQL Cluster NDB 7\&.0, it is not possible to cause
291
\fBndbmtd\fR
292 293 294 295
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
296 297 298 299 300 301 302
.PP
Like
\fBndbd\fR,
\fBndbmtd\fR
generates a set of log files which are placed in the directory specified by
DataDir
in the
303 304 305
config\&.ini
configuration file\&. Except for trace files, these are generated in the same way and have the same names as those generated by
\fBndbd\fR\&.
306 307 308
.PP
In the event of a critical error,
\fBndbmtd\fR
309 310
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
311
\fBndbmtd\fR
312 313
thread\&. The names of these files follow the pattern
ndb_\fInode_id\fR_trace\&.log\&.\fItrace_id\fR_t\fIthread_id\fR, where
314
\fInode_id\fR
315
is the data node\'s unique node ID in the cluster,
316 317 318
\fItrace_id\fR
is a trace sequence number, and
\fIthread_id\fR
319
is the thread ID\&. For example, in the event of the failure of an
320 321 322
\fBndbmtd\fR
process running as a MySQL Cluster data node having the node ID 3 and with
MaxNoOfExecutionThreads
323 324 325 326 327
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
328
\fBndbd\fR
329
trace files\&.
330 331 332 333
.PP
The
\fBndbd\fR
exit codes and messages that are generated when a data node process shuts down prematurely are also used by
334 335 336
\fBndbmtd\fR\&. See
\m[blue]\fBndbd Error Messages\fR\m[]\&\s-2\u[3]\d\s+2, for a listing of these\&.
.if n \{\
337
.sp
338 339
.\}
.RS 4
340 341 342 343
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
344
.ps +1
345
\fBNote\fR
346 347
.ps -1
.br
348 349 350 351 352
.PP
It is possible to use
\fBndbd\fR
and
\fBndbmtd\fR
353 354 355
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
356
.SH "COPYRIGHT"
357
.br
358
.PP
359
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
360 361 362 363 364
.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
365 366 367 368 369 370
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
371
\%http://bugs.mysql.com/bug.php?id=41915
372 373 374 375
.RE
.IP " 2." 4
Bug#44915
.RS 4
376
\%http://bugs.mysql.com/bug.php?id=44915
377 378 379 380 381 382
.RE
.IP " 3." 4
ndbd Error Messages
.RS 4
\%http://dev.mysql.com/doc/ndbapi/en/ndbd-error-messages.html
.RE
383 384 385 386 387
.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
388
Sun Microsystems, Inc. (http://www.mysql.com/).