MySQL Cluster Configuration

A MySQL server that is part of MySQL Cluster differs in only one aspect from what we are used to. It has an additional storage engine (NDB or NDBCLUSTER).

Except for this, the MySQL server is not much different than what we are used to from previous MySQL releases, except any other new 4.1 features, of course. By default, the server is configured with the NDB storage engine disabled (so as not to allocate resources needlessly). To enable NDB, you need to modify my.cnf.

Moreover, since the MySQL server is a part of the cluster, it needs to know how to access a MGM node to get the cluster configuration. There is a default behavior to look for the MGM node on localhost. However if you need to specify its location elsewhere, this is also done in my.cnf or on the MySQL server command line. Before the storage engine NDB may be used, a MGM node and the DB nodes must be up and running. One MGM node is sufficient to start.

Building from Source Code

NDB Cluster is available in binary distributions from MySQL-Max 4.1.3 on.

If you choose to build from a source tarball or the MySQL 4.1 BitKeeper tree, make sure you use the --with-ndbcluster option when running configure. You could also simply use the BUILD/compile-pentium-max build script. This script also includes OpenSSL, so you either have to get OpenSSL of modify the build script to exclude it.

Apart from these things, you can just follow the standard instructions to build your own binaries, run the tests and perform the installation procedure. See the section called “Installing from the Development Source Tree”.

Installing the Software

It is easiest if you have all the MGM and DB nodes up and running first, and this will probably be the most time-consuming part of the configuration (because we will assume that you are already familiar with MySQL to a certain extent). As for the MySQL configuration and the my.cnf file, this is very straightforward, and this section only covers the differences from configuring MySQL without clustering.

Quick Test Setup of MySQL Cluster

This section describes how to quickly configure and start the simplest possible MySQL Cluster setup. This will make you familiar with the basic concepts. Then, read the other sections and design your desired setup.

One directory must be created. The example uses /var/lib/mysql-cluster. Execute the following command as root:

shell> mkdir /var/lib/mysql-cluster

In this directory, create a file config.ini with the following contents. Substitute HostName and DataDir values that are appropriate for your system.

# file "config.ini" - showing minimal setup consisting of 1 DB node,
# 1 management server, and 3 MySQL servers.
# The empty default sections are not needed, and are shown only for clarity.
# Storage nodes are required to provide a host name but MySQL Servers
# are not. Thus the configuration can be dynamic as to setting up the
# MySQL Servers.
# If you don't know the host name of your machine, use localhost.
# The DataDir parameter also has a default value, but it is recommended to
# set it explicitly.
# NDBD, MYSQLD, and NDB_MGMD are aliases for DB, API, and MGM respectively
#
[NDBD DEFAULT]
NoOfReplicas= 1

[MYSQLD DEFAULT]
[NDB_MGMD DEFAULT]
[TCP DEFAULT]

[NDB_MGMD]
HostName= myhost.example.com

[NDBD]
HostName= myhost.example.com
DataDir= /var/lib/mysql-cluster

[MYSQLD]
[MYSQLD]
[MYSQLD]

You can now start the management server. Do this as follows:

shell> cd /var/lib/mysql-cluster
shell> ndb_mgmd

Then start a single DB node in this simple setup by running the ndbd program. If this is the very first time you are starting ndbd, use the --initial option:

shell> ndbd --initial

For subsequent ndbd starts, do not use that option:

shell> ndbd

By default, ndbd will look for the management server at localhost at port 2200.

Please note that if you installed from the binary tarball, you will need to explicitly specify the path of the ndb_mgmd and ndbd servers. They would be in the /usr/local/mysql/bin directory.

Finally, go to the MySQL data directory (this might be a location such as /var/lib/mysql or /usr/local/mysql/data). Ensure that the my.cnf file contains the option necessary to enable the NDB Cluster storage engine:

[mysqld]
ndbcluster

You can now start the MySQL server as usual:

shell> mysqld_safe --user=mysql &

Wait a moment to make sure the MySQL server is running properly. If you see a notice “mysql ended”, check the server's .err file to find out what went wrong.

If all went well so far, you now can start using the cluster:

shell> mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.7-gamma

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SHOW STORAGE ENGINES;
+------------+---------+------------------------------------------------------------+
| Engine     | Support | Comment                                                    |
+------------+---------+------------------------------------------------------------+
...
| NDBCLUSTER | DEFAULT | Clustered, fault-tolerant, memory-based tables             |
| NDB        | YES     | Alias for NDBCLUSTER                                       |
...

mysql> USE test;
Database changed

mysql> CREATE TABLE ctest (i INT) ENGINE=NDBCLUSTER;
Query OK, 0 rows affected (0.09 sec)

mysql> show create table ctest \G
*************************** 1. row ***************************
       Table: ctest
Create Table: CREATE TABLE `ctest` (
  `i` int(11) default NULL
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

If you like to check that your nodes was set-up properly you can then start the management client.

shell> ndb_mgm

Try using the SHOW command to get an overview of the cluster.

NDB> show
Cluster Configuration
---------------------
[ndbd(NDB)]     1 node(s)
id=2    @127.0.0.1  (Version: 3.5.3, Nodegroup: 0, Master)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @127.0.0.1  (Version: 3.5.3)

[mysqld(API)]   3 node(s)
id=3    @127.0.0.1  (Version: 3.5.3)
id=4 (not connected, accepting connect from any host)
id=5 (not connected, accepting connect from any host)

Clustering is yours. Enjoy.

Configuration File

The configuration of MySQL Cluster is contained in a configuration file read by the management server and distributed to all processes being part part of the cluster. This file contains a description of all involved nodes in the cluster, configuration parameters for the storage nodes and configuration parameters for all connections between the nodes in the cluster.

An Example Configuration in a MySQL Cluster

Currently the configuration file is in INI format, and is named config.ini by default. It is placed in the start directory of ndb_mgmd (the management server).

Preset defaults are available for most parameters, and defaults can be specified in the config.ini file itself. To create a default value section, add the word DEFAULT to the section name. For example, DB nodes are coconfigured using [DB] sections. If all DB nodes use the same data memory size, and this size is not the same as the preset default size, create a [DB DEFAULT] section that contains a DataMemory line to specify the default data memory size for all DB nodes.

The INI format consists of sections preceded by section headings (surrounded by square brackets), followed by settings and values. One deviation from the standard format being that the setting name and value can be separated by a colon (‘:’) in addition to the equal sign (‘=’), and another is that the sections aren't unique. Instead, unique entries (such as two nodes of the same type) are identified by a unique ID.

A minimalistic configuration file needs to define the computers involved in the cluster and which nodes are involved in the cluster and what computers these nodes are placed on.

An example of a still fairly minimalistic configuration file for a cluster with one management server, two storage nodes and two MySQL servers is shown below:

# file "config.ini" - 2 DB nodes and 2 mysqld
# This file is placed in the start directory of ndb_mgmd,
# the management server.
# The first MySQL Server can be started from any host and the second
# can only be started at the host mysqld_5.mysql.com
# NDBD, MYSQLD, and NDB_MGMD are aliases for DB, API, and MGM respectively
#
[NDBD DEFAULT]
NoOfReplicas= 2
DataDir= /var/lib/mysql-cluster

[NDB_MGMD]
Hostname= ndb_mgmd.mysql.com
DataDir= /var/lib/mysql-cluster

[NDBD]
HostName= ndbd_2.mysql.com

[NDBD]
HostName= ndbd_3.mysql.com

[MYSQLD]
[MYSQLD]
HostName= mysqld_5.mysql.com

There are six different sections in the config file. [COMPUTER] defines the computers in the cluster. [DB|NDBD] defines the storage nodes in the cluster. [API|MYSQLD] defines the MySQL server nodes in the cluster. [MGM|NDB_MGMD] defines the management server node in the cluster. [TCP] defines TCP/IP connections between nodes in the cluster, TCP/IP is the default connection mechanism between two nodes. [SHM] defines shared-memory connections between nodes. This is only available in binaries that have been built with the --with-ndb-shm option.

For each section one can define DEFAULTs. Parameters are case insensitive as of MySQL 4.1.5.

Defining the Computers in a MySQL Cluster

The [COMPUTER] section has no real significance other than serving as a way to avoid the need of defining host names for each node in the system. All parameters mentioned here are mandatory.

[COMPUTER]Id

This is an internal identity in the configuration file. Later on in the file one refers to this computer by the ID. It is an integer.

[COMPUTER]HostName

This is the host name of the computer. It is also possible to use an IP address rather than the host name.

Defining the Management Server in a MySQL Cluster

The [MGM] section (with its alias [NDB_MGMD]) is used to configure the behavior of the management server in various aspects. The mandatory parameter is either ExecuteOnComputer or HostName. All other parameters can be left out and will in that case receive the default value.

[MGM]Id

This identity is the node ID used as the address of the node in all cluster internal messages. This is an integer between 1 and 63. Each node in the cluster has a unique identity.

[MGM]ExecuteOnComputer

This is referring to one of the computers defined in the computer section.

[MGM]PortNumber

This is the port number which the management server will listen on for configuration requests and management commands.

[MGM]LogDestination

This parameter specifies where to send the cluster log. There are three possible places to send it to and they can be sent to all three in parallel if desired. These three are CONSOLE, SYSLOG, and FILE. One assigns all of these three in one string with each part separated by a ';'.

CONSOLE means putting it to stdout, no more parameters are needed.

CONSOLE

SYSLOG means sending it to a syslog facility. It is necessary to specify the facility for this parameter. The poossible facilities are auth, authpriv, cron, daemon, ftp, kern, lpr, mail, news, syslog, user, uucp, local0, local1, local2, local3, local4, local5, local6, local7. Note that every facility is not necessarily supported by every operating system.

SYSLOG:facility=syslog

FILE means sending the cluster log to a regular file on the machine. It is necessary to specify the name of this file, the maximum size of the file until a new file is opened and the old is renamed with filename extended by .x where x is the next number not used yet on the file. It is also necessary to specify maximum number of rolled files.

FILE:filename=cluster.log,maxsize=1000000,maxfiles=6

Multiple log destinations can be specified as in the following example.

CONSOLE;SYSLOG:facility=local0;FILE:filename=/var/log/mgmd

The default value of this parameter is FILE:filename=cluster.log,maxsize=1000000,maxfiles=6.

[MGM]ArbitrationRank

This parameter is used to define which nodes can act as an arbitrator. MGM nodes and API nodes can be arbitrators. 0 means it isn't used as arbitrator, 1 high priority and 2 low priority. A normal configuration uses the management server as arbitrator setting the ArbitrationRank to 1 (which is the default) and setting all APIs to 0 (not default in MySQL 4.1.3).

[MGM]ArbitrationDelay

If setting this to anything else than 0 it means that the management server will delay responses to the arbitration requests. Default is no delay and this should not be necessary to change.

[MGM]DataDir

This sets the directory where output files from the management server will be placed. These files include cluster log files, file for printouts from the process and pid file for daemon.

Defining the Storage Nodes in a MySQL Cluster

The [DB] section (with its alias [NDBD]) is used to configure the behavior of the storage nodes. There are many parameters specified that controls the buffer sizes, pool sizes, timeout parameters and so forth. The only mandatory parameter is either ExecuteOnComputer or HostName and the parameter NoOfReplicas which need to be defined in the [DB DEFAULT] section. Most parameters should be set in the [DB DEFAULT] section. Only parameters explicitly stated as possible to have local values are allowed to be changed in the [DB] section. HostName, Id and ExecuteOnComputer needs to be defined in the local [DB] section.

The Id value, or the node identity of the storage node can now be allocated at start of the node. It is still possible to assign a node ID in the config file.

For each parameter it is possible to use k, M, or G as suffixes to indicate units of 1024, (1024*1024), or (1024* 1024*1024). For example, 100k means 102400. Parameters and values are currently case sensitive.

[DB]Id

This identity is the node ID used as the address of the node in all cluster internal messages. This is an integer between 1 and 63. Each node in the cluster has a unique identity.

[DB]ExecuteOnComputer

This is referring to one of the computers defined in the computer section.

[DB]HostName

This parameter is similar to specifying a computer to execute on. It defines the host name of the computer the storage node is to reside on. Either this parameter or the ExecuteOnComputer is mandatory.

[DB]ServerPort

Each node in the cluster will use one port as the port other nodes use to connect the transporters to each other. This port is used also for non-TCP transporters in the connection setup phase. The default port will be calculated to ensure that no nodes on the same computer receive the same port number. The minimum port number will be 2202.

[DB]NoOfReplicas

This parameter can be set only in the [DB DEFAULT] section because it is a global parameter. It defines the number of replicas for each table stored in the cluster. This parameter also specifies the size of node groups. A node group is a set of nodes that all store the same information.

Node groups are formed implicitly. The first node group is formed by the storage nodes with the lowest node identities. And the next by the next lowest node identities. As an example presume we have 4 storage nodes and NoOfReplicas is set to 2. The four storage nodes have node IDs 2, 3, 4 and 5. Then the first node group will be formed by node 2 and node 3. The second node group will be formed by node 4 and node 5. It is important to configure the cluster in such a manner such that nodes in the same node groups are not placed on the same computer. This would cause a single HW failure to cause a cluster crash.

If no node identities are provided then the order of the storage nodes will be the determining factor for the node group. The actual node group assigned will be printed by the SHOW command in the management client.

There is no default value and the maximum number is 4.

[DB]DataDir

This parameter specifies the directory where trace files, log files, pid files and error logs are placed.

[DB]FileSystemPath

This parameter specifies the directory where all files created for metadata, REDO logs, UNDO logs and data files are placed. The default value is to use the same directory as the DataDir. The directory must be created before starting the ndbd process.

If you use the recommended directory hierarchy, you will use a directory /var/lib/mysql-cluster. Under this directory a directory ndb_2_fs will be created (if node ID was 2) which will be the file system for that node.

[DB]BackupDataDir

It is possible also to specify the directory where backups will be placed. By default, the directory FileSystemPath/BACKUP will be choosen.

DataMemory and IndexMemory are the parameters that specify the size of memory segments used to store the actual records and their indexes. It is important to understand how DataMemory and IndexMemory are used to understand how to set these parameters. For most uses, they need to be updated to reflect the usage of the cluster.

[DB]DataMemory

This parameter is one of the most important parameters because it defines the space available to store the actual records in the database. The entire DataMemory will be allocated in memory so it is important that the machine contains enough memory to handle the DataMemory size.

The DataMemory is used to store two things. It stores the actual records. Each record is currently of fixed size. So VARCHAR columns are stored as fixed size columns. There is an overhead on each record of 16 bytes normally. Additionally each record is stored in a 32KB page with 128 byte page overhead. There will also be a small amount of waste for each page because records are only stored in one page. The maximum record size for the columns currently is 8052 bytes.

The DataMemory is also used to store ordered indexes. Ordered indexes uses about 10 bytes per record. Each record in the table is always represented in the ordered index.

The DataMemory consists of 32KB pages. These pages are allocated to partitions of the tables. Each table is normally partitioned with the same number of partitions as there are storage nodes in the cluster. Thus for each node there are the same number of partitions (=fragments) as the NoOfReplicas is set to. Once a page has been allocated to a partition it is currently not possible to bring it back to the pool of free pages. The method to restore pages to the pool is by deleting the table. Performing a node recovery also will compress the partition because all records are inserted into an empty partition from another live node.

Another important aspect is that the DataMemory also contains UNDO information for records. For each update of a record a copy record is allocated in the DataMemory. Also each copy record will also have an instance in the ordered indexes of the table. Unique hash indexes are updated only when the unique index columns are updated and in that case a new entry in the index table is inserted and at commit the old entry is deleted. Thus it is necessary also to allocate memory to be able to handle the largest transactions which are performed in the cluster.

Performing large transactions has no advantage in MySQL Cluster other than the consistency of using transactions which is the whole idea of transactions. It is not faster and consumes large amounts of memory.

The default DataMemory size is 80MB. The minimum size is 1MB. There is no maximum size, but in reality the maximum size has to be adapted so that the process doesn't start swapping when using the maximum size of the memory.

[DB]IndexMemory

The IndexMemory is the parameter that controls the amount of storage used for hash indexes in MySQL Cluster. Hash indexes are always used for primary key indexes, unique indexes, and unique constraints. Actually when defining a primary key and a unique index there will be two indexes created in MySQL Cluster. One index is a hash index which is used for all tuple accesses and also for lock handling. It is also used to ensure unique constraints.

The size of the hash index is 25 bytes plus the size of the primary key. For primary keys larger than 32 bytes another 8 bytes is added for some internal references.

Thus for a table defined as

CREATE TABLE example
(
    a INT NOT NULL,
    b INT NOT NULL,
    c INT NOT NULL,
    PRIMARY KEY(a),
    UNIQUE(b)
) ENGINE=NDBCLUSTER;

We will have 12 bytes overhead (having no nullable columns saves 4 bytes of overhead) plus 12 bytes of data per record. In addition we will have two ordered indexes on a and b consuming about 10 bytes each per record. We will also have a primary key hash index in the base table with roughly 29 bytes per record. The unique constraint is implemented by a separate table with b as primary key and a as a column. This table will consume another 29 bytes of index memory per record in the table and also 12 bytes of overhead plus 8 bytes of data in the record part.

Thus for one million records, we will need 58MB of index memory to handle the hash indexes for the primary key and the unique constraint. For the DataMemory part we will need 64MB of memory to handle the records of the base table and the unique index table plus the two ordered index tables.

The conclusion is that hash indexes takes up a fair amount of memory space but in return they provide very fast access to the data. They are also used in MySQL Cluster to handle uniqueness constraints.

Currently the only partitioning algorithm is hashing and the ordered indexes are local to each node and can thus not be used to handle uniqueness constraints in the general case.

An important point for both IndexMemory and DataMemory is that the total database size is the the sum of all DataMemory and IndexMemory in each node group. Each node group is used to store replicated information, so if there are four nodes with 2 replicas there will be two node groups and thus the total DataMemory available is 2*DataMemory in each of the nodes.

Another important point is about changes of DataMemory and IndexMemory. First of all, it is highly recommended to have the same amount of DataMemory and IndexMemory in all nodes. Since data is distributed evenly over all nodes in the cluster the size available is no better than the smallest sized node in the cluster times the number of node groups.

DataMemory and IndexMemory can be changed, but it is dangerous to decrease them because that can easily lead to a node that will not be able to restart or even a cluster not being able to restart since there is not enough memory space for the tables needed to restore into the starting node. Increasing them should be quite okay, but it is recommended that such upgrades are performed in the same manner as a software upgrade where first the configuration file is updated, then the management server is restarted and then one storage node at a time is restarted by command.

More IndexMemory is not used due to updates but inserts are inserted immediately and deletes are not deleted until the transaction is committed.

The default IndexMemory size is 18MB. The minimum size is 1MB.

The next three parameters are important because they affect the number of parallel transactions and the sizes of transactions that can be handled by the system. MaxNoOfConcurrentTransactions sets the number of parallel transactions possible in a node and MaxNoOfConcurrentOperations sets the number of records that can be in update phase or locked simultaneously.

Both of these parameters and particularly MaxNoOfConcurrentOperations are likely targets for users setting specific values and not using the default value. The default value is set for systems using small transactions and to ensure not using too much memory in the default case.

[DB]MaxNoOfConcurrentTransactions

For each active transaction in the cluster there needs to be also a transaction record in one of the nodes in the cluster. The role of transaction coordination is spread among the nodes and thus the total number of transactions records in the cluster is the amount in one times the number of nodes in the cluster.

Actually transaction records are allocated to MySQL servers, normally there is at least one transaction record allocated in the cluster per connection that uses or have used a table in the cluster. Thus one should ensure that there is more transaction records in the cluster than there are concurrent connections to all MySQL servers in the cluster.

This parameter has to be the same in all nodes in the cluster.

Changing this parameter is never safe and can cause a cluster crash. When a node crashes one of the node (actually the oldest surviving node) will build up the transaction state of all transactions ongoing in the crashed node at the time of the crash. It is thus important that this node has as many transaction records as the failed node.

The default value for this parameter is 4096.

[DB]MaxNoOfConcurrentOperations

This parameter is likely to be subject for change by users. Users performing only short, small transactions don't need to set this parameter very high. Applications desiring to be able to perform rather large transactions involving many records need to set this parameter higher.

For each transaction that updates data in the cluster it is required to have operation records. There are operation records both in the transaction coordinator and in the nodes where the actual updates are performed.

The operation records contain state information needed to be able to find UNDO records for rollback, lock queues, and much other state information.

To dimension the cluster to handle transactions where one million records are updated simultaneously one should set this parameter to one million divided by the number of nodes. Thus for a cluster with four storage nodes one should set this parameter to 250000.

Also read queries which set locks use up operation records. Some extra space is allocated in the local nodes to cater for cases where the distribution is not perfect over the nodes.

When queries translate into using the unique hash index there will actually be two operation records used per record in the transaction. The first one represents the read in the index table and the second handles the operation on the base table.

The default value for this parameter is 32768.

This parameter actually handles two parts that can be configured separately. The first part specifies how many operation records are to be placed in the transaction coordinator part. The second part specifies how many operation records that are to be used in the local database part.

If a very big transaction is performed on a 8-node cluster then this will need as many operation records in the transaction coordinator as there are reads, updates, deletes involved in the transaction. The transaction will however spread the operation records of the actual reads, updates, and inserts over all eight nodes. Thus if it is necessary to configure the system for one very big transaction then it is a good idea to configure those separately. MaxNoOfConcurrentOperations will always be used to calculate the number of operation records in the transaction coordinator part of the node.

It is also important to have an idea of the memory requirements for those operation records. In MySQL 4.1.5, operation records consume about 1KB per record. This figure will shrink in future 5.x versions.

[DB]MaxNoOfLocalOperations

By default this parameter is calculated as 1.1 * MaxNoOfConcurrentOperations which fits systems with many simultaneous, not very large transactions. If the configuration needs to handle one very large transaction at a time and there are many nodes then it is a good idea to configure this separately.

The next set of parameters are used for temporary storage in the midst of executing a part of a query in the cluster. All of these records will have been released when the query part is completed and is waiting for the commit or rollback.

Most of the defaults for these parameters will be okay for most users. Some high-end users might want to increase those to enable more parallelism in the system and some low-end users might want to decrease them to save memory.

[DB]MaxNoOfConcurrentIndexOperations

For queries using a unique hash index another set of operation records are temporarily used in the execution phase of the query. This parameter sets the size of this pool. Thus this record is only allocated while executing a part of a query, as soon as this part has been executed the record is released. The state needed to handle aborts and commits is handled by the normal operation records where the pool size is set by the parameter MaxNoOfConcurrentOperations.

The default value of this parameter is 8192. Only in rare cases of extremely high parallelism using unique hash indexes should this parameter be necessary to increase. To decrease could be performed for memory savings if the DBA is certain that such high parallelism is not occurring in the cluster.

[DB]MaxNoOfFiredTriggers

The default value of MaxNoOfFiredTriggers is 4000. Normally this value should be sufficient for most systems. In some cases it could be decreased if the DBA feels certain the parallelism in the cluster is not so high.

This record is used when an operation is performed that affects a unique hash index. Updating a column that is part of a unique hash index or inserting/deleting a record in a table with unique hash indexes will fire an insert or delete in the index table. This record is used to represent this index table operation while its waiting for the original operation that fired it to complete. Thus it is short lived but can still need a fair amount of records in its pool for temporary situations with many parallel write operations on a base table containing a set of unique hash indexes.

[DB]TransactionBufferMemory

This parameter is also used for keeping fired operations to update index tables. This part keeps the key and column information for the fired operations. It should be very rare that this parameter needs to be updated.

Also normal read and write operations use a similar buffer. This buffer is even more short term in its usage so this is a compile time parameter set to 4000*128 bytes (500KB). The parameter is ZATTRBUF_FILESIZE in Dbtc.hpp. A similar buffer for key info exists which contains 4000*16 bytes, 62.5KB of buffer space. The parameter in this case is ZDATABUF_FILESIZE in Dbtc.hpp. Dbtc is the module for handling the transaction coordination.

Similar parameters exist in the Dblqh module taking care of the reads and updates where the data is located. In Dblqh.hpp with ZATTRINBUF_FILESIZE set to 10000*128 bytes (1250KB) and ZDATABUF_FILE_SIZE, set to 10000*16 bytes (roughly 156KB) of buffer space. No known instances of that any of those compile time limits haven't been big enough has been reported so far or discovered by any of our extensive test suites.

The default size of the TransactionBufferMemory is 1MB.

[DB]MaxNoOfConcurrentScans

This parameter is used to control the amount of parallel scans that can be performed in the cluster. Each transaction coordinator can handle the amount of parallel scans defined by this parameter. Each scan query is performed by scanning all partitions in parallel. Each partition scan will use a scan record in the node where the partition is located. The number of those records is the size of this parameter times the number of nodes so that the cluster should be able to sustain maximum number of scans in parallel from all nodes in the cluster.

Scans are performed in two cases. The first case is when no hash or ordered indexes exists to handle the query. In this case the query is executed by performing a full table scan. The second case is when there is no hash index to support the query but there is an ordered index. Using the ordered index means executing a parallel range scan. Since the order is only kept on the local partitions it is necessary to perform the index scan on all partitions.

The default value of MaxNoOfConcurrentScans is 256. The maximum value is 500.

This parameter will always specify the number of scans possible in the transaction coordinator. If the number of local scan records is not provided it is calculated as the product of MaxNoOfConcurrentScans and the number of storage nodes in the system.

[DB]MaxNoOfLocalScans

Possible to specify the number of local scan records if many scans are not fully parallelized.

[DB]BatchSizePerLocalScan

This parameter is used to calculate the number of lock records which needs to be there to handle many concurrent scan operations.

The default value is 64 and this value has a strong connection to the ScanBatchSize defined in the API nodes.

[DB]LongMessageBuffer

This is an internal buffer used for message passing internally in the node and for messages between nodes in the system. It is highly unlikely that anybody would need to change this parameter but for configurability it is now configurable. By default it is set to 1MB.

[DB]NoOfFragmentLogFiles

This is an important parameter that states the size of the REDO log files in the node. REDO log files are organized in a ring such that it is important that the tail and the head doesn't meet. When the tail and head have come to close the each other the node will start aborting all updating transactions because there is no room for the log records.

REDO log records aren't removed until three local checkpoints have completed since the log record was inserted. The speed of checkpoint is controlled by a set of other parameters so these parameters are all glued together. The default parameter value is 8, which means 8 sets of 4 16MB files. Thus in total 512MB. Thus the unit is 64MB of REDO log space. In high update scenarios this parameter needs to be set very high. Test cases where it has been necessary to set it to over 300 have been performed.

If the checkpointing is slow and there are so many writes to the database that the log files are full and the log tail cannot be cut for recovery reasons then all updating transactions will be aborted with internal error code 410 which will be translated to Out of log file space temporarily. This condition will prevail until a checkpoint has completed and the log tail can be moved forward.

[DB]MaxNoOfSavedMessages

This parameter sets the maximum number of trace files that will be kept before overwriting old trace files. Trace files are generated when the node crashes for some reason.

The default is 25 trace files.

The next set of parameters defines the pool sizes for metadata objects. It is necessary to define the maximum number of attributes, tables, indexes, and trigger objects used by indexes, events and replication between clusters.

[DB]MaxNoOfAttributes

This parameter defines the number of attributes that can be defined in the cluster.

The default value of this parameter is 1000. The minimum value is 32 and there is no maximum. Each attribute consumes around 200 bytes of storage in each node because metadata is fully replicated in the servers.

[DB]MaxNoOfTables

A table object is allocated for each table, for each unique hash index, and for each ordered index. This parameter sets the maximum number of table objects in the cluster.

For each attribute that has a BLOB data type an extra table is used to store most of the BLOB data. These tables also must be taken into account when defining the number of tables.

The default value of this parameter is 128. The minimum is 8 and there is no maximum. There are internal limitations though that limits the maximum number of tables to 1600. Each table object consumes around 20KB in each node.

[DB]MaxNoOfOrderedIndexes

For each ordered index in the cluster, objects are allocated to describe what it is indexing and its storage parts. By default each index defined will have an ordered index also defined. Unique indexes and primary key indexes have both an ordered index and a hash index.

The default value of this parameter is 128. Each object consumes around 10KB of data per node.

[DB]MaxNoOfUniqueHashIndexes

For each unique index (not for primary keys) a special table is allocated that maps the unique key to the primary key of the indexed table. By default there will be an ordered index also defined for each unique index. To avoid this, you must use the USING HASH option in the unique index definition.

The default value is 64. Each index will consume around 15KB per node.

[DB]MaxNoOfTriggers

For each unique hash index an internal update, insert and delete trigger is allocated. Thus three triggers per unique hash index. Ordered indexes use only one trigger object. Backups also use three trigger objects for each normal table in the cluster. When replication between clusters is supported it will also use internal triggers.

This parameter sets the maximum number of trigger objects in the cluster.

The default value of this parameter is 768.

[DB]MaxNoOfIndexes

This parameter was deprecated in MySQL 4.1.5. Now you should use MaxNoOfOrderedIndexes and MaxNoOfUniqueHashIndexes instead.

This parameter is only used by unique hash indexes. There needs to be one record in this pool for each unique hash index defined in the cluster.

The default value of this parameter is 128.

There is a set of boolean parameters affecting the behavior of storage nodes. Boolean parameters can be specified to true by setting it to Y or 1 and to false by setting it to N or 0.

[DB]LockPagesInMainMemory

For a number of operating systems such as Solaris and Linux it is possible to lock a process into memory and avoid all swapping problems. This is an important feature to provide real-time characteristics of the cluster.

The default is that this feature is not enabled.

[DB]StopOnError

This parameter states whether the process is to exit on error condition or whether it is perform an automatic restart.

The default is that this feature is enabled.

[DB]Diskless

In the internal interfaces it is possible to set tables as diskless tables meaning that the tables are not checkpointed to disk and no logging occur. They only exist in main memory. The tables will still exist after a crash but not the records in the table.

This feature makes the entire cluster Diskless, in this case even the tables doesn't exist anymore after a crash. Enabling this feature can be done by either setting it to Y or 1.

When this feature is enabled, backups will be performed but will not be stored because there is no "disk". In future releases it is likely to make the backup diskless a separate configurable parameter.

The default is that this feature is not enabled.

[DB]RestartOnErrorInsert

This feature is only accessible when building the debug version where it is possible to insert errors in the execution of various code parts to test failure cases.

The default is that this feature is not enabled.

There are quite a few parameters specifying timeouts and time intervals between various actions in the storage nodes. Most of the timeouts are specified in milliseconds with a few exceptions which will be mentioned below.

[DB]TimeBetweenWatchDogCheck

To ensure that the main thread doesn't get stuck in an eternal loop somewhere there is a watch dog thread which checks the main thread. This parameter states the number of milliseconds between each check. After three checks and still being in the same state the process is stopped by the watch dog thread.

This parameter can easily be changed and can be different in the nodes although there seems to be little reason for such a difference.

The default timeout is 4000 milliseconds (4 seconds).

[DB]StartPartialTimeout

This parameter specifies the time that the cluster will wait for all storage nodes to come up before the algorithm to start the cluster is invocated. This time out is used to avoid starting only a partial cluster if possible.

The default value is 30000 milliseconds (30 seconds). 0 means eternal time out. Thus only start if all nodes are available.

[DB]StartPartitionedTimeout

If the cluster is ready start after waiting StartPartialTimeout but is still in a possibly partitioned state one waits until also this timeout has passed.

The default timeout is 60000 milliseconds (60 seconds).

[DB]StartFailureTimeout

If the start is not completed within the time specified by this parameter the node start will fail. Setting this parameter to 0 means no time out is applied on the time to start the cluster.

The default value is 60000 milliseconds (60 seconds). For storage nodes containing large data sets this parameter needs to be increased because it could very well take 10-15 minutes to perform a node restart of a storage node with a few gigabytes of data.

[DB]HeartbeatIntervalDbDb

One of the main methods of discovering failed nodes is by heartbeats. This parameter states how often heartbeat signals are sent and how often to expect to receive them. After missing three heartbeat intervals in a row, the node is declared dead. Thus the maximum time of discovering a failure through the heartbeat mechanism is four times the heartbeat interval.

The default heartbeat interval is 1500 milliseconds (1.5 seconds). This parameter must not be changed drastically. If one node uses 5000 milliseconds and the node watching it uses 1000 milliseconds then obviously the node will be declared dead very quickly. So this parameter can be changed in small steps but not in large steps.

[DB]HeartbeatIntervalDbApi

In a similar manner each storage node sends heartbeats to each of the connected MySQL servers to ensure that they behave properly. If a MySQL server doesn't send a heartbeat in time (same algorithm as for storage node with three heartbeats missed causing failure) it is declared down and all ongoing transactions will be completed and all resources will be released and the MySQL server cannot reconnect until the completion of all activities started by the previous MySQL instance has been completed.

The default interval is 1500 milliseconds. This interval can be different in the storage node because each storage node independently of all other storage nodes watches the MySQL servers connected to it.

[DB]TimeBetweenLocalCheckpoints

This parameter is an exception in that it doesn't state any time to wait before starting a new local checkpoint. This parameter is used to ensure that in a cluster where not so many updates are taking place that we don't perform local checkpoints. In most clusters with high update rates it is likely that a new local checkpoint is started immediately after the previous was completed.

The size of all write operations executed since the start of the previous local checkpoints is added. This parameter is specified as the logarithm of the number of words. So the default value 20 means 4MB of write operations, 21 would mean 8MB and so forth up until the maximum value 31 which means 8GB of write operations.

All the write operations in the cluster are added together. Setting it to 6 or lower means that local checkpoints will execute continuosly without any wait between them independent of the workload in the cluster.

[DB]TimeBetweenGlobalCheckpoints

When a transaction is committed it is committed in main memory in all nodes where mirrors of the data existed. The log records of the transaction are not forced to disk as part of the commit however. The reasoning here is that having the transaction safely committed in at least two independent computers should be meeting standards of durability.

At the same time it is also important to ensure that even the worst of cases when the cluster completely crashes is handled properly. To ensure this all transactions in a certain interval is put into a global checkpoint. A global checkpoint is very similar to a grouped commit of transactions. An entire group of transactions is sent to disk. Thus as part of the commit the transaction was put into a global checkpoint group. Later this groups log records are forced to disk and then the entire group of transaction is safely committed also on all computers disk storage as well.

This parameter states the interval between global checkpoints. The default time is 2000 milliseconds.

[DB]TimeBetweenInactiveTransactionAbortCheck

Time-out handling is performed by checking each timer on each transaction every period of time in accordance with this parameter. Thus if this parameter is set to 1000 milliseconds, then every transaction will be checked for timeout once every second.

The default for this parameter is 1000 milliseconds (1 second).

[DB]TransactionInactiveTimeout

If the transaction is currently not performing any queries but is waiting for further user input, this parameter states the maximum time that the user can wait before the transaction is aborted.

The default for this parameter is no timeout. For a real-time database that needs to control that no transaction keeps locks for a too long time this parameter should be set to a much smaller value. The unit is milliseconds.

[DB]TransactionDeadlockDetectionTimeout

When a transactioon is involved in executing a query it waits for other nodes. If the other nodes doesn't respond it could depend on three things. First, the node could be dead, second the operation could have entered a lock queue and finally the node requested to perform the action could be heavily overloaded. This timeout parameter states how long the transaction coordinator will wait until it aborts the transaction when waiting for query execution of another node.

Thus this parameter is important both for node failure handling and for deadlock detection. Setting it too high would cause a non-desirable behavior at deadlocks and node failures.

The default time out is 1200 milliseconds (1.2 seconds).

[DB]NoOfDiskPagesToDiskAfterRestartTUP

When executing a local checkpoint the algorithm sends all data pages to disk during the local checkpoint. Simply sending them there as quickly as possible will cause unnecessary load on both processors, networks, and disks. Thus to control the write speed this parameter specifies how many pages per 100 milliseconds is to be written. A page is here defined as 8KB. The unit this parameter is specified in is thus 80KB per second. So setting it to 20 means writing 1.6MB of data pages to disk per second during a local checkpoint. Also writing of UNDO log records for data pages is part of this sum. Writing of index pages (see IndexMemory to understand what index pages are used for) and their UNDO log records is handled by the parameter NoOfDiskPagesToDiskAfterRestartACC. This parameter handles the limitation of writes from the DataMemory.

So this parameter specifies how quickly local checkpoints will be executed. This parameter is important in connection with NoOfFragmentLogFiles, DataMemory, IndexMemory. The default value is 40 (3.2MB of data pages per second).

[DB]NoOfDiskPagesToDiskAfterRestartACC

This parameter has the same unit as NoOfDiskPagesToDiskAfterRestartTUP but limits the speed of writing index pages from IndexMemory.

The default value of this parameter is 20 (1.6MB per second).

[DB]NoOfDiskPagesToDiskDuringRestartTUP

This parameter specifies the same things as NoOfDiskPagesToDiskAfterRestartTUP and NoOfDiskPagesToDiskAfterRestartACC, only it does it for local checkpoints executed in the node as part of a local checkpoint when the node is restarting. As part of all node restarts a local checkpoint is always performed. Since during a node restart it is possible to use a higher speed of writing to disk because fewer activities are performed in the node due to the restart phase.

This parameter handles the DataMemory part.

The default value is 40 (3.2MB per second).

[DB]NoOfDiskPagesToDiskDuringRestartACC

During Restart for IndexMemory part of local checkpoint.

The default value is 20 (1.6MB per second).

[DB]ArbitrationTimeout

This parameter specifies the time that the storage node will wait for a response from the arbitrator when sending an arbitration message in the case of a split network.

The default value is 1000 milliseconds (1 second).

A number of new configuration parameters were introduced in MySQL 4.1.5. These correspond to values that previously were compile time parameters. The main reason for this is to enable the advanced user to have more control of the size of the process and adjust various buffer sizes according to his needs.

All of these buffers are used as front-ends to the file system when writing log records of various kinds to disk. If the node runs with Diskless then these parameters can most definitely be set to their minimum values because all disk writes are faked as okay by the file system abstraction layer in the NDB storage engine.

[DB]UndoIndexBuffer

This buffer is used during local checkpoints. The NDB storage engine uses a recovery scheme based on a consistent checkpoint together with an operational REDO log. In order to produce a consistent checkpoint without blocking the entire system for writes, UNDO logging is done while performing the local checkpoint. The UNDO logging is only activated on one fragment of one table at a time. This optimization is possible because tables are entirely stored in main memory.

This buffer is used for the updates on the primary key hash index. Inserts and deletes rearrange the hash index and the NDB storage engine writes UNDO log records that map all physical changes to an index page such that they can be undone at a system restart. It also logs all active insert operations at the start of a local checkpoint for the fragment.

Reads and updates only set lock bits and update a header in the hash index entry. These changes are handled by the page write algorithm to ensure that these operations need no UNDO logging.

This buffer is 2MB by default. The minimum value is 1MB. For most applications this is good enough. Applications doing extremely heavy inserts and deletes together with large transactions using large primary keys might need to extend this buffer.

If this buffer is too small, the NDB storage engine issues the internal error code 677 which will be translated into "Index UNDO buffers overloaded".

[DB]UndoDataBuffer

This buffer has exactly the same role as the UndoIndexBuffer but is used for the data part. This buffer is used during local checkpoint of a fragment and inserts, deletes, and updates use the buffer.

Since these UNDO log entries tend to be bigger and more things are logged, the buffer is also bigger by default. It is set to 16MB by default. For some applications this might be too conservative and they might want to decrease this size, the minimum size is 1MB. It should be rare that applications need to increase this buffer size. If there is a need for this it is a good idea to check if the disks can actually handle the load that the update activity in the database causes. If they cannot then no size of this buffer will be big enough.

If this buffer is too small and gets congested, the NDB storage engine issues the internal error code 891 which will be translated to "Data UNDO buffers overloaded".

[DB]RedoBuffer

All update activities also need to be logged. This enables a replay of these updates at system restart. The recovery algorithm uses a consistent checkpoint produced by a "fuzzy" checkpoint of the data together with UNDO logging of the pages. Then it applies the REDO log to play back all changes up until the time that will be restored in the system restart.

This buffer is 8MB by default. The minimum value is 1MB.

If this buffer is too small, the NDB storage engine issues the internal error code 1221 which will be translated into "REDO log buffers overloaded".

For cluster management, it is important to be able to control the amount of log messages sent to stdout for various event types. The possible events will be listed in this manual soon. There are 16 levels possible from level 0 to level 15. Setting event reporting to level 15 means receiving all event reports of that category and setting it to 0 means getting no event reports in that category.

The reason why most defaults are set to 0 and thus not causing any output to stdout is that the same message is sent to the cluster log in the management server. Only the startup message is by default generated to stdout.

A similar set of levels can be set in management client to define what levels to record in the cluster log.

[DB]LogLevelStartup

Events generated during startup of the process.

The default level is 1.

[DB]LogLevelShutdown

Events generated as part of graceful shutdown of a node.

The default level is 0.

[DB]LogLevelStatistic

Statistical events such as how many primary key reads, updates, inserts and many other statistical information of buffer usage, and so forth.

The default level is 0.

[DB]LogLevelCheckpoint

Events generated by local and global checkpoints.

The default level is 0.

[DB]LogLevelNodeRestart

Events generated during node restart.

The default level is 0.

[DB]LogLevelConnection

Events generated by connections between nodes in the cluster.

The default level is 0.

[DB]LogLevelError

Events generated by errors and warnings in the cluster. These are errors not causing a node failure but still considered worth reporting.

The default level is 0.

[DB]LogLevelInfo

Events generated for information about state of cluster and so forth.

The default level is 0.

There is a set of parameters defining memory buffers that are set aside for online backup execution.

[DB]BackupDataBufferSize

When executing a backup there are two buffers used for sending data to the disk. This buffer is used to fill in data recorded by scanning the tables in the node. When filling this to a certain level the pages are sent to disk. This level is specified by the BackupWriteSize parameter. When sending data to the disk, the backup can continue filling this buffer until it runs out of buffer space. When running out of buffer space, it will simply stop the scan and wait until some disk writes return and thus free up memory buffers to use for further scanning.

The default value is 2MB.

[DB]BackupLogBufferSize

This parameter has a similar role but instead used for writing a log of all writes to the tables during execution of the backup. The same principles apply for writing those pages as for BackupDataBufferSize except that when this part runs out of buffer space, it causes the backup to fail due to lack of backup buffers. Thus the size of this buffer must be big enough to handle the load caused by write activities during the backup execution.

The default parameter should be big enough. Actually it is more likely that a backup failure is caused by a disk not able to write as quickly as it should. If the disk subsystem is not dimensioned for the write load caused by the applications this will create a cluster which will have great difficulties to perform the desired actions.

It is important to dimension the nodes in such a manner that the processors becomes the bottleneck rather than the disks or the network connections.

The default value is 2MB.

[DB]BackupMemory

This parameter is simply the sum of the two previous, the BackupDataBufferSize and BackupLogBufferSize.

The default value is 4MB.

[DB]BackupWriteSize

This parameter specifies the size of the write messages to disk for the log and data buffer used for backups.

The default value is 32KB.

Defining the MySQL Servers in a MySQL Cluster

The [API] section (with its alias [MYSQLD]) defines the behavior of the MySQL server. No parameter is mandatory. If no computer or host name is provided, then any host can use this API node.

[API]Id

This identity is the node ID used as the address of the node in all cluster internal messages. This is an integer between 1 and 63. Each node in the cluster must have a unique identity.

[API]ExecuteOnComputer

This is referring to one of the computers defined in the computer section.

[API]ArbitrationRank

This parameter is used to define which nodes can act as an arbitrator. MGM nodes and API nodes can be arbitrators. 0 means it isn't used as arbitrator, 1 high priority and 2 low priority. A normal configuration uses the management server as arbitrator setting the ArbitrationRank to 1 (which is the default) and setting all APIs to 0 (not default in MySQL 4.1.3).

[API]ArbitrationDelay

If setting this to anything else than 0 it means that the management server will delay responses to the arbitration requests. Default is no delay and this should not be necessary to change.

[API]BatchByteSize

For queries that get translated into full table scans or range scans on indexes, it is important for best performance to fetch records in properly sized batches. It is possible to set the proper size both in terms of number of records and in terms of bytes. Real batch size will be limited by both parameters.

Performance of queries can vary more than 40% due to how this parameter is set. In future releases, the MySQL Server will make educated guesses on what to set these parameters to, based on the query type.

This parameter is measured in bytes and is by default equal to 32KB.

[API]BatchSize

This parameter is measured in number of records and is by default set to 64. The maximum size is 992.

[API]MaxScanBatchSize

The batch size is the size of each batch sent from each storage node. Most scans are performed in parallel so to protect the MySQL Server from getting too much data from many nodes in parallel, this parameter sets a limit to the total batch size over all nodes.

The default value of this parameter is set to 256KB. Its maximum size is 16MB.

Defining TCP/IP Connections in a MySQL Cluster

TCP/IP is the default transport mechanism for establishing connections in MySQL Cluster. It is actually not necessary to define any connection because there will be a one connection setup between each of the storage nodes, between each storage node, and all MySQL server nodes and between each storage node and the management server.

It is only necessary to define a connection if it is necessary to change the default values of the connection. In that case it is necessary to define at least NodeId1, NodeId2 and the parameters to change.

It is also possible to change the default values by setting the parameters in the [TCP DEFAULT] section.

[TCP]NodeId1, [TCP]NodeId2,

To identify a connection between two nodes it is necessary to provide the node identity for both of them in NodeId1 and NodeId2.

[TCP]SendBufferMemory

TCP transporters use a buffer all messages before performing the send call to the operating system. When this buffer reaches 64KB it sends the buffer, the buffer is also sent when a round of messages have been executed. To handle temporary overload situations it is also possible to define a bigger send buffer. The default size of the send buffer is 256KB.

[TCP]SendSignalId

To be able to retrace a distributed message diagram it is necessary to identify each message with an identity. By setting this parameter to Y these message identities are also transported over the network. This feature is not enabled by default.

[TCP]Checksum

This parameter is also a Y/N parameter which is not enabled by default. When enabled all messages are checksummed before put into the send buffer. This feature enables control that messages are not corrupted while waiting in the send buffer. It is also a double check that the transport mechanism haven't corrupted the data.

[TCP]PortNumber

This is the port number to use for listening to connections from other nodes. This port number should be specified in the [TCP DEFAULT] section normally.

This parameter should no longer be used. Use the parameter ServerPort on storage nodes instead.

[TCP]ReceiveBufferMemory

This parameter specifies the size of the buffer used when receiving data from the TCP/IP socket. There is seldom any need to change this parameter from its default value of 64KB. One possible reason could be to save memory.

Defining Shared-Memory Connections in a MySQL Cluster

Shared memory segments are currently supported only for special builds of MySQL Cluster using the configure parameter --with-ndb-shm. Its implementation will most likely change. When defining shared memory as the connection method it is necessary to define at least NodeId1, NodeId2 and ShmKey. All other parameters have default values that will work out fine in most cases.

[SHM]NodeId1, [SHM]NodeId2,

To identify a connection between two nodes it is necessary to provide the node identity for both of them in NodeId1 and NodeId2.

[SHM]ShmKey

When setting up shared memory segments an identifier is used to uniquely identify the shared memory segment to use for the communication. This is an integer which does not have a default value.

[SHM]ShmSize

Each connection has a shared memory segment where messages between the nodes are put by the sender and read by the reader. This segment has a size defined by this parameter. Default value is 1MB.

[SHM]SendSignalId

To be able to retrace a distributed message diagram it is necessary to identify each message with an identity. By setting this parameter to Y these message identities are also transported over the network. This feature is not enabled by default.

[SHM]Checksum

This parameter is also a Y/N parameter which is not enabled by default. When enabled all messages are checksummed before put into the send buffer. This feature enables control that messages are not corrupted while waiting in the send buffer. It is also a double check that the transport mechanism haven't corrupted the data.

Defining SCI Transporter Connections in a MySQL Cluster

SCI Transporters as connection between nodes in the MySQL Cluster is only supported for special builds of MySQL Cluster using the configure parameter --with-ndb-sci=/your/path/to/SCI. The path should point to a directory that contains at least a lib and a include directory where SISCI libraries and header files are provided.

It is strongly recommended to only use SCI Transporters for communication between ndbd processes. Also using SCI Transporters will mean that the ndbd process will never sleep so use SCI Transporters only for machines with at least 2 CPU's which are dedicated for use by ndbd process(es). There should be at least 1 CPU per ndbd process in this case and in addition at least one more is needed to also handle OS activities.

[SCI]NodeId1, [SCI]NodeId2,

To identify a connection between two nodes it is necessary to provide the node identity for both of them in NodeId1 and NodeId2.

[SCI]Host1SciId0

This identifies the SCI node id on the first node identified by NodeId1.

[SCI]Host1SciId1

It is possible to set-up SCI Transporters for fail-over between two SCI cards which then should use separate networks between the nodes. This identifies the node id and the second SCI card to be used on the first node.

[SCI]Host2SciId0

This identifies the SCI node id on the second node identified by NodeId2.

[SCI]Host2SciId1

It is possible to set-up SCI Transporters for fail-over between two SCI cards which then should use separate networks between the nodes. This identifies the node id and the second SCI card to be used on the second node.

[SCI]SharedBufferSize

Each SCI transporter has a shared memory segment between the two nodes. With this segment set to the default 1 MB most applications should be ok. Smaller sizes such as 256 kB has problems when performing many parallel inserts. If the buffer is too small it can cause crashes of the ndbd process.

[SCI]SendLimit

A small buffer in front of the SCI media buffers up messages before sending them over the SCI network. By default this is set to 8kB. Most benchmark measurements shows that tops are reached at 64 kB but 16kB reaches within a few percent of the performance and for all MySQL Cluster benchmarks it was no measurable difference in increasing it beyond 8kB.

[SCI]SendSignalId

To be able to retrace a distributed message diagram it is necessary to identify each message with an identity. By setting this parameter to Y these message identities are also transported over the network. This feature is not enabled by default.

[SCI]Checksum

This parameter is also a Y/N parameter which is not enabled by default. When enabled all messages are checksummed before put into the send buffer. This feature enables control that messages are not corrupted while waiting in the send buffer. It is also a double check that the transport mechanism haven't corrupted the data.