Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 38.1Mb
PDF (A4) - 38.1Mb
PDF (RPM) - 36.7Mb
HTML Download (TGZ) - 9.9Mb
HTML Download (Zip) - 9.9Mb
HTML Download (RPM) - 8.7Mb
Man Pages (TGZ) - 209.7Kb
Man Pages (Zip) - 318.9Kb
Info (Gzip) - 3.5Mb
Info (Zip) - 3.5Mb
Excerpts from this Manual

21.3.3.12 NDB Cluster Shared-Memory Connections

The shared memory (SHM) transporter is distinguished from other NDB transporters by the fact that signals are transported by writing in memory rather than on a socket. NDB Cluster attempts to use the shared memory transporter and configure it automatically between data nodes and API nodes on the same host. In NDB 7.6.6 and later, you can use [shm] sections in the config.ini file to define shared memory connections between nodes in the cluster explicitly. To enable explicit shared memory connections, set the UseShm SHM configuration parameter to true. When explicitly defining shared memory as the connection method, it is also necessary to define at least NodeId1, NodeId2, and ShmKey. All other SHM parameters have default values that should work well in most cases.

For optimum performance, you can define a spin time for the SHM transporter (ShmSpinTime parameter); this affects both the data node receiver thread and the poll owner (receive thread or user thread) in NDB.

  • Checksum

    Table 21.290 This table provides type and value information for the Checksum shared memory configuration parameter

    Property Value
    Version (or later) NDB 7.5.0
    Type or units boolean
    Default true
    Range true, false
    Restart Type N

    This parameter is a boolean (Y/N) parameter which is disabled by default. When it is enabled, checksums for all messages are calculated before being placed in the send buffer.

    This feature prevents messages from being corrupted while waiting in the send buffer. It also serves as a check against data being corrupted during transport.

  • HostName1

    Table 21.291 This table provides type and value information for the HostName1 shared memory configuration parameter

    Property Value
    Version (or later) NDB 7.5.0
    Type or units name or IP address
    Default [none]
    Range ...
    Restart Type N

    The HostName1 and HostName2 parameters can be used to specify specific network interfaces to be used for a given SHM connection between two nodes. The values used for these parameters can be host names or IP addresses.

  • HostName2

    Table 21.292 This table provides type and value information for the HostName1 shared memory configuration parameter

    Property Value
    Version (or later) NDB 7.5.0
    Type or units name or IP address
    Default [none]
    Range ...
    Restart Type N

    The HostName1 and HostName2 parameters can be used to specify specific network interfaces to be used for a given SHM connection between two nodes. The values used for these parameters can be host names or IP addresses.

  • NodeId1

    Table 21.293 This table provides type and value information for the NodeId1 shared memory configuration parameter

    Property Value
    Version (or later) NDB 7.5.0
    Type or units numeric
    Default [none]
    Range 1 - 255
    Restart Type N

    To identify a connection between two nodes it is necessary to provide node identifiers for each of them, as NodeId1 and NodeId2.

  • NodeId2

    Table 21.294 This table provides type and value information for the NodeId2 shared memory configuration parameter

    Property Value
    Version (or later) NDB 7.5.0
    Type or units numeric
    Default [none]
    Range 1 - 255
    Restart Type N

    To identify a connection between two nodes it is necessary to provide node identifiers for each of them, as NodeId1 and NodeId2.

  • NodeIdServer

    Table 21.295 This table provides type and value information for the NodeIdServer shared memory configuration parameter

    Property Value
    Version (or later) NDB 7.5.0
    Type or units numeric
    Default [none]
    Range 1 - 63
    Restart Type N

    Identify the server end of a shared memory connection.

  • OverloadLimit

    Table 21.296 This table provides type and value information for the OverloadLimit shared memory configuration parameter

    Property Value
    Version (or later) NDB 7.5.0
    Type or units bytes
    Default 0
    Range 0 - 4294967039 (0xFFFFFEFF)
    Restart Type N

    When more than this many unsent bytes are in the send buffer, the connection is considered overloaded.

    This parameter can be used to determine the amount of unsent data that must be present in the send buffer before the connection is considered overloaded. See Section 21.3.3.14, “Configuring NDB Cluster Send Buffer Parameters”, and Section 21.5.10.44, “The ndbinfo transporters Table”, for more information.

  • PreSendChecksum

    Table 21.297 This table provides type and value information for the PreSendChecksum shared memory configuration parameter

    Property Value
    Version (or later) NDB 7.6.6
    Type or units boolean
    Default false
    Range true, false
    Restart Type S

    If this parameter and Checksum are both enabled, perform pre-send checksum checks, and check all SHM signals between nodes for errors. Has no effect if Checksum is not also enabled.

  • SendBufferMemory

    Table 21.298 This table provides type and value information for the SendBufferMemory shared memory configuration parameter

    Property Value
    Version (or later) NDB 7.6.6
    Type or units integer
    Default 2M
    Range 256K - 4294967039 (0xFFFFFEFF)
    Restart Type N

    Size (in bytes) of the shared shared memory buffer for signals sent from this node using a shared memory connection.

  • SendSignalId

    Table 21.299 This table provides type and value information for the SendSignalId shared memory configuration parameter

    Property Value
    Version (or later) NDB 7.5.0
    Type or units boolean
    Default false
    Range true, false
    Restart Type N

    To retrace the path of a distributed message, it is necessary to provide each message with a unique identifier. Setting this parameter to Y causes these message IDs to be transported over the network as well. This feature is disabled by default in production builds, and enabled in -debug builds.

  • ShmKey

    Table 21.300 This table provides type and value information for the ShmKey shared memory configuration parameter

    Property Value
    Version (or later) NDB 7.5.0
    Type or units unsigned
    Default 0
    Range 0 - 4294967039 (0xFFFFFEFF)
    Restart Type N

    When setting up shared memory segments, a node ID, expressed as an integer, is used to identify uniquely the shared memory segment to use for the communication. There is no default value.

  • ShmSize

    Table 21.301 This table provides type and value information for the ShmSize shared memory configuration parameter

    Property Value
    Version (or later) NDB 7.5.0
    Type or units bytes
    Default 1M
    Range 64K - 4294967039 (0xFFFFFEFF)
    Restart Type N
    Version (or later) NDB 7.6.6
    Type or units bytes
    Default 4M
    Range 64K - 4294967039 (0xFFFFFEFF)
    Restart Type N

    Each SHM connection has a shared memory segment where messages between nodes are placed by the sender and read by the reader. The size of this segment is defined by ShmSize. The default value is 1MB.

  • ShmSpinTime

    Table 21.302 This table provides type and value information for the ShmSpinTime shared memory configuration parameter

    Property Value
    Version (or later) NDB 7.6.6
    Type or units integer
    Default 0
    Range 0 - 2000
    Restart Type S

    When receiving, the time to wait before sleeping, in milliseconds.

  • SigNum

    Table 21.303 This table provides type and value information for the Signum shared memory configuration parameter

    Property Value
    Version (or later) NDB 7.5.0
    Type or units unsigned
    Default [none]
    Range 0 - 4294967039 (0xFFFFFEFF)
    Restart Type N

    When using the shared memory transporter, a process sends an operating system signal to the other process when there is new data available in the shared memory. Should that signal conflict with an existing signal, this parameter can be used to change it. This is a possibility when using SHM due to the fact that different operating systems use different signal numbers.

    The default value of SigNum is 0; therefore, it must be set to avoid errors in the cluster log when using the shared memory transporter. Typically, this parameter is set to 10 in the [shm default] section of the config.ini file.

  • UseShm

    Table 21.304 This table provides type and value information for the UseShm shared memory configuration parameter

    Property Value
    Version (or later) NDB 7.6.6
    Type or units boolean
    Default false
    Range true, false
    Restart Type S

    Enable shared memory connections between nodes. Set true to enable.


User Comments
Sign Up Login You must be logged in to post a comment.