NDB Cluster Configuration Files The use of direct TCP connections between data nodes can improve the cluster’s overall efficiency by enabling the data nodes to bypass an Ethernet device such as a switch, hub, or router, thus cutting down on the cluster’s latency. To take the best advantage of direct connections in this fashion with more than two data nodes, you must have a direct connection between each data node and every other data node in the same node group. Note 23.3.3.12 NDB Cluster Shared-Memory Connections Communications between NDB cluster nodes are normally handled using TCP/IP. The shared memory (SHM) transporter is distinguished by the fact that signals are transmitted by writing in memory rather than on a socket. The shared-memory transporter (SHM) can improve performance by negating up to 20% of the overhead required by a TCP connection when running an API node (usually an SQL node) and a data node together on the same host. You can enable a shared memory connection in either of the two ways listed here: Suppose a cluster is running a data node which has node ID 1 and an SQL node having node ID 51 on the same host computer at 10.0.0.1. To enable an SHM connection between these two nodes, all that is necessary is to insure that the following entries are included in the cluster configuration file: The two entries just shown are in addition to any other entries and parameter settings needed by the cluster. A more complete example is shown later in this section. Before starting data nodes that use SHM connections, it is also necessary to make sure that the operating system on each computer hosting such a data node has sufficient memory allocated to shared memory segments. See the documentation for your operating platform for information regarding this. In setups where multiple hosts are each running a data node and an API node, it is possible to enable shared memory on all such hosts by setting  UseShm  in the  [ndbd default]  section of the configuration file. This is shown in the example later in this section. While not strictly required, tuning for all SHM connections in the cluster can be done by setting one or more of the following parameters in the  [shm default]  section of the cluster configuration ( config.ini ) file: 4226 • ShmSize : Shared memory size • ShmSpinTime : Time in µs to spin before sleeping • SendBufferMemory : Size of buffer for signals sent from this node, in bytes. •By setting the  UseShm  data node configuration parameter to  1 , and setting  HostName  for the data node and  HostName  for the API node to the same value. •By using  [shm]  sections in the cluster configuration file, each containing settings for  NodeId1  and NodeId2 . This method is described in more detail later in this section. [ndbd] NodeId=1 HostName=10.0.0.1 UseShm=1 [mysqld] NodeId=51 HostName=10.0.0.1 Important