Related Documentation Download this Excerpt
PDF (US Ltr) - 4.3Mb
PDF (A4) - 4.3Mb
EPUB - 2.2Mb
HTML Download (TGZ) - 2.1Mb
HTML Download (Zip) - 2.1Mb


5.3.8.1 MySQL Server Options for NDB Cluster

This section provides descriptions of mysqld server options relating to NDB Cluster . For information about mysqld options not specific to NDB Cluster , and for general information about the use of options with mysqld, see Server Command Options.

For information about command-line options used with other NDB Cluster processes (ndbd, ndb_mgmd, and ndb_mgm), see Section 6.27, “Options Common to NDB Cluster Programs — Options Common to NDB Cluster Programs”. For information about command-line options used with NDB utility programs (such as ndb_desc, ndb_size.pl, and ndb_show_tables), see Chapter 6, NDB Cluster Programs.

  • --ndb-allow-copying-alter-table=[ON|OFF]

    Table 5.10 Type and value information for ndb-allow-copying-alter-table

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-allow-copying-alter-table

    Yes Yes No
    Yes Both Yes
    NDB 7.5 boolean ON

    DESCRIPTION: Set to OFF to keep ALTER TABLE from using copying operations on NDB tables


    Let ALTER TABLE and other DDL statements use copying operations on NDB tables. Set to OFF to keep this from happening; doing so may improve performance of critical applications.

  • --ndb-batch-size=#

    Table 5.11 Type and value information for ndb-batch-size

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-batch-size

    Yes Yes No
    Yes Global No
    NDB 7.5 integer 32768 / 0 - 31536000

    DESCRIPTION: Size (in bytes) to use for NDB transaction batches


    This sets the size in bytes that is used for NDB transaction batches.

  • --ndb-cluster-connection-pool=#

    Table 5.12 Type and value information for ndb-cluster-connection-pool

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-cluster-connection-pool

    Yes Yes Yes
    Yes Global No
    NDB 7.5 integer 1 / 1 - 63

    DESCRIPTION: Number of connections to the cluster used by MySQL


    By setting this option to a value greater than 1 (the default), a mysqld process can use multiple connections to the cluster, effectively mimicking several SQL nodes. Each connection requires its own [api] or [mysqld] section in the cluster configuration (config.ini) file, and counts against the maximum number of API connections supported by the cluster.

    Suppose that you have 2 cluster host computers, each running an SQL node whose mysqld process was started with --ndb-cluster-connection-pool=4; this means that the cluster must have 8 API slots available for these connections (instead of 2). All of these connections are set up when the SQL node connects to the cluster, and are allocated to threads in a round-robin fashion.

    This option is useful only when running mysqld on host machines having multiple CPUs, multiple cores, or both. For best results, the value should be smaller than the total number of cores available on the host machine. Setting it to a value greater than this is likely to degrade performance severely.

    Important

    Because each SQL node using connection pooling occupies multiple API node slots—each slot having its own node ID in the cluster—you must not use a node ID as part of the cluster connection string when starting any mysqld process that employs connection pooling.

    Setting a node ID in the connection string when using the --ndb-cluster-connection-pool option causes node ID allocation errors when the SQL node attempts to connect to the cluster.

  • --ndb-cluster-connection-pool-nodeids=list

    Table 5.13 Type and value information for ndb-cluster-connection-pool-nodeids

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-cluster-connection-pool-nodeids

    Yes Yes No
    Yes Global No
    NDB 7.5 set /

    DESCRIPTION: Comma-separated list of node IDs for connections to the cluster used by MySQL; the number of nodes in the list must be the same as the value set for --ndb-cluster-connection-pool


    Specifies a comma-separated list of node IDs for connections to the cluster used by an SQL node. The number of nodes in this list must be the same as the value set for the --ndb-cluster-connection-pool option.

    --ndb-cluster-connection-pool-nodeids was added in NDB 7.5.0.

  • --ndb-blob-read-batch-bytes=bytes

    Table 5.14 Type and value information for ndb-blob-read-batch-bytes

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-blob-read-batch-bytes

    Yes Yes No
    Yes Both Yes
    NDB 7.5 integer 65536 / 0 - 4294967295

    DESCRIPTION: Specifies size in bytes that large BLOB reads should be batched into. 0 = no limit.


    This option can be used to set the size (in bytes) for batching of BLOB data reads in NDB Cluster applications. When this batch size is exceeded by the amount of BLOB data to be read within the current transaction, any pending BLOB read operations are immediately executed.

    The maximum value for this option is 4294967295; the default is 65536. Setting it to 0 has the effect of disabling BLOB read batching.

    Note

    In NDB API applications, you can control BLOB write batching with the setMaxPendingBlobReadBytes() and getMaxPendingBlobReadBytes() methods.

  • --ndb-blob-write-batch-bytes=bytes

    Table 5.15 Type and value information for ndb-blob-write-batch-bytes

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-blob-write-batch-bytes

    Yes Yes No
    Yes Both Yes
    NDB 7.5 integer 65536 / 0 - 4294967295

    DESCRIPTION: Specifies size in bytes that large BLOB writes should be batched into. 0 = no limit.


    This option can be used to set the size (in bytes) for batching of BLOB data writes in NDB Cluster applications. When this batch size is exceeded by the amount of BLOB data to be written within the current transaction, any pending BLOB write operations are immediately executed.

    The maximum value for this option is 4294967295; the default is 65536. Setting it to 0 has the effect of disabling BLOB write batching.

    Note

    In NDB API applications, you can control BLOB write batching with the setMaxPendingBlobWriteBytes() and getMaxPendingBlobWriteBytes() methods.

  • --ndb-connectstring=connection_string

    Table 5.16 Type and value information for ndb-connectstring

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-connectstring

    Yes No No
    Yes No
    NDB 7.5 string

    DESCRIPTION: Point to the management server that distributes the cluster configuration


    When using the NDBCLUSTER storage engine, this option specifies the management server that distributes cluster configuration data. See Section 5.3.3, “NDB Cluster Connection Strings”, for syntax.

  • --ndb-default-column-format=[FIXED|DYNAMIC]

    Table 5.17 Type and value information for ndb-default-column-format

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-default-column-format

    Yes Yes No
    Yes Global Yes
    5.7.11-ndb-7.5.1 enumeration DYNAMIC / FIXED, DYNAMIC
    5.7.16-ndb-7.5.4 enumeration FIXED / FIXED, DYNAMIC

    DESCRIPTION: Use this value (FIXED or DYNAMIC) by default for COLUMN_FORMAT and ROW_FORMAT options when creating or adding columns to a table.


    In NDB 7.5.1 and later, sets the default COLUMN_FORMAT and ROW_FORMAT for new tables (see CREATE TABLE Syntax).

    In NDB 7.5.1, the default for this option was DYNAMIC; in NDB 7.5.4, the default was changed to FIXED to maintain backwards compatibility with older release series (Bug #24487363).

  • --ndb-deferred-constraints=[0|1]

    Table 5.18 Type and value information for ndb-deferred-constraints

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-deferred-constraints

    Yes Yes No
    Yes Both Yes
    NDB 7.5 integer 0 / 0 - 1

    DESCRIPTION: Specifies that constraint checks on unique indexes (where these are supported) should be deferred until commit time. Not normally needed or used; for testing purposes only.


    Controls whether or not constraint checks on unique indexes are deferred until commit time, where such checks are supported. 0 is the default.

    This option is not normally needed for operation of NDB Cluster or NDB Cluster Replication, and is intended primarily for use in testing.

  • --ndb-distribution=[KEYHASH|LINHASH]

    Table 5.19 Type and value information for ndb-distribution

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-distribution

    Yes Yes No
    Yes Global Yes
    NDB 7.5 enumeration KEYHASH / LINHASH, KEYHASH

    DESCRIPTION: Default distribution for new tables in NDBCLUSTER (KEYHASH or LINHASH, default is KEYHASH)


    Controls the default distribution method for NDB tables. Can be set to either of KEYHASH (key hashing) or LINHASH (linear hashing). KEYHASH is the default.

  • --ndb-mgmd-host=host[:port]

    Table 5.20 Type and value information for ndb-mgmd-host

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-mgmd-host

    Yes No No
    Yes No
    NDB 7.5 string localhost:1186

    DESCRIPTION: Set the host (and port, if desired) for connecting to management server


    Can be used to set the host and port number of a single management server for the program to connect to. If the program requires node IDs or references to multiple management servers (or both) in its connection information, use the --ndb-connectstring option instead.

  • --ndbcluster

    Table 5.21 Type and value information for ndbcluster

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndbcluster

    Yes No No
    Yes No
    NDB 7.5 boolean FALSE

    DESCRIPTION: Enable NDB Cluster (if this version of MySQL supports it)

    Disabled by --skip-ndbcluster


    The NDBCLUSTER storage engine is necessary for using NDB Cluster . If a mysqld binary includes support for the NDBCLUSTER storage engine, the engine is disabled by default. Use the --ndbcluster option to enable it. Use --skip-ndbcluster to explicitly disable the engine.

    It is not necessary or desirable to use this option together with --initialize. Beginning with NDB 7.5.4, --ndbcluster is ignored (and the NDB storage engine is not enabled) if --initialize is also used. (Bug #81689, Bug #23518923)

  • --ndb-log-apply-status

    Table 5.22 Type and value information for ndb-log-apply-status

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-log-apply-status

    Yes Yes No
    Yes Global No
    NDB 7.5 boolean OFF

    DESCRIPTION: Cause a MySQL server acting as a slave to log mysql.ndb_apply_status updates received from its immediate master in its own binary log, using its own server ID. Effective only if the server is started with the --ndbcluster option.


    Causes a slave mysqld to log any updates received from its immediate master to the mysql.ndb_apply_status table in its own binary log using its own server ID rather than the server ID of the master. In a circular or chain replication setting, this allows such updates to propagate to the mysql.ndb_apply_status tables of any MySQL servers configured as slaves of the current mysqld.

    In a chain replication setup, using this option allows downstream (slave) clusters to be aware of their positions relative to all of their upstream contributors (masters).

    In a circular replication setup, this option causes changes to ndb_apply_status tables to complete the entire circuit, eventually propagating back to the originating NDB Cluster . This also allows a cluster acting as a master to see when its changes (epochs) have been applied to the other clusters in the circle.

    This option has no effect unless the MySQL server is started with the --ndbcluster option.

  • --ndb-log-empty-epochs=[ON|OFF]

    Table 5.23 Type and value information for ndb-log-empty-epochs

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-log-empty-epochs

    Yes Yes No
    Yes Global Yes
    NDB 7.5 boolean OFF

    DESCRIPTION: When enabled, causes epochs in which there were no changes to be written to the ndb_apply_status and ndb_binlog_index tables, even when --log-slave-updates is enabled.


    Causes epochs during which there were no changes to be written to the ndb_apply_status and ndb_binlog_index tables, even when --log-slave-updates is enabled.

    By default this option is disabled. Disabling --ndb-log-empty-epochs causes epoch transactions with no changes not to be written to the binary log, although a row is still written even for an empty epoch in ndb_binlog_index.

    Because --ndb-log-empty-epochs=1 causes the size of the ndb_binlog_index table to increase independently of the size of the binary log, users should be prepared to manage the growth of this table, even if they expect the cluster to be idle a large part of the time.

  • --ndb-log-empty-update=[ON|OFF]

    Table 5.24 Type and value information for ndb-log-empty-update

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-log-empty-update

    Yes Yes No
    Yes Global Yes
    NDB 7.5 boolean OFF

    DESCRIPTION: When enabled, causes updates that produced no changes to be written to the ndb_apply_status and ndb_binlog_index tables, even when --log-slave-updates is enabled.


    Causes updates that produced no changes to be written to the ndb_apply_status and ndb_binlog_index tables, even when --log-slave-updates is enabled.

    By default this option is disabled (OFF). Disabling --ndb-log-empty-update causes updates with no changes not to be written to the binary log.

  • --ndb-log-exclusive-reads=[0|1]

    Table 5.25 Type and value information for ndb-log-exclusive-reads

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-log-exclusive-reads

    Yes Yes No
    Yes Both Yes
    NDB 7.5 boolean 0

    DESCRIPTION: Log primary key reads with exclusive locks; allow conflict resolution based on read conflicts.


    Starting the server with this option causes primary key reads to be logged with exclusive locks, which allows for NDB Cluster Replication conflict detection and resolution based on read conflicts. You can also enable and disable these locks at runtime by setting the value of the ndb_log_exclusive_reads system variable to 1 or 0, respectively. 0 (disable locking) is the default.

    For more information, see Read conflict detection and resolution.

  • --ndb-log-orig

    Table 5.26 Type and value information for ndb-log-orig

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-log-orig

    Yes Yes No
    Yes Global No
    NDB 7.5 boolean OFF

    DESCRIPTION: Log originating server id and epoch in mysql.ndb_binlog_index table.


    Log the originating server ID and epoch in the ndb_binlog_index table.

    Note

    This makes it possible for a given epoch to have multiple rows in ndb_binlog_index, one for each originating epoch.

    For more information, see Section 8.4, “NDB Cluster Replication Schema and Tables”.

  • --ndb-log-transaction-id

    Table 5.27 Type and value information for ndb-log-transaction-id

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-log-transaction-id

    Yes Yes No
    Yes Global No
    NDB 7.5 boolean OFF

    DESCRIPTION: Write NDB transaction IDs in the binary log. Requires --log-bin-v1-events=OFF.


    Causes a slave mysqld to write the NDB transaction ID in each row of the binary log. Such logging requires the use of the Version 2 event format for the binary log; thus, --log-bin-use-v1-row-events must be set to FALSE in order to use this option.

    This option is not supported in mainline MySQL Server 5.7. It is required to enable NDB Cluster Replication conflict detection and resolution using the NDB$EPOCH_TRANS() function (see NDB$EPOCH_TRANS()).

    The default value is FALSE.

    For more information, see Section 8.11, “NDB Cluster Replication Conflict Resolution”.

  • --ndb-nodeid=#

    Table 5.28 Type and value information for ndb-nodeid

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-nodeid

    Yes No Yes
    Yes Global No
    5.0.45 integer / 1 - 63
    5.1.5 integer / 1 - 255

    DESCRIPTION: MySQL Cluster node ID for this MySQL server


    Set this MySQL server's node ID in an NDB Cluster .

    The --ndb-nodeid option overrides any node ID set with --ndb-connectstring, regardless of the order in which the two options are used.

    In addition, if --ndb-nodeid is used, then either a matching node ID must be found in a [mysqld] or [api] section of config.ini, or there must be an open [mysqld] or [api] section in the file (that is, a section without a NodeId or Id parameter specified). This is also true if the node ID is specified as part of the connection string.

    Regardless of how the node ID is determined, its is shown as the value of the global status variable Ndb_cluster_node_id in the output of SHOW STATUS, and as cluster_node_id in the connection row of the output of SHOW ENGINE NDBCLUSTER STATUS.

    For more information about node IDs for NDB Cluster SQL nodes, see Section 5.3.7, “Defining SQL and Other API Nodes in an NDB Cluster”.

  • --ndb_optimization_delay=milliseconds

    Table 5.29 Type and value information for ndb_optimization_delay

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb_optimization_delay

    No Yes No
    No Global Yes
    NDB 7.5 integer 10 / 0 - 100000

    DESCRIPTION: Sets the number of milliseconds to wait between processing sets of rows by OPTIMIZE TABLE on NDB tables.


    Set the number of milliseconds to wait between sets of rows by OPTIMIZE TABLE statements on NDB tables. The default is 10.

  • --ndb-recv-thread-activation-threshold=threshold

    Table 5.30 Type and value information for ndb-recv-thread-activation-threshold

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-recv-thread-activation-threshold

    Yes No No
    Yes No
    5.6.10-ndb-7.3.1 integer 8 / 0 (MIN_ACTIVATION_THRESHOLD) - 16 (MAX_ACTIVATION_THRESHOLD)

    DESCRIPTION: Activation threshold when receive thread takes over the polling of the cluster connection (measured in concurrently active threads)


    When this number of concurrently active threads is reached, the receive thread takes over polling of the cluster connection.

  • --ndb-recv-thread-cpu-mask=bitmask

    Table 5.31 Type and value information for ndb-recv-thread-cpu-mask

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-recv-thread-cpu-mask

    Yes No No
    Yes No
    NDB 7.5 bitmap [empty]

    DESCRIPTION: CPU mask for locking receiver threads to specific CPUs; specified as hexadecimal. See documentation for details.


    Set a CPU mask for locking receiver threads to specific CPUs. This is specified as a hexadecimal bitmask; for example, 0x33 means that one CPU is used per receiver thread. An empty string (no locking of receiver threads) is the default.

  • ndb-transid-mysql-connection-map=state

    Table 5.32 Type and value information for ndb-transid-mysql-connection-map

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-transid-mysql-connection-map

    Yes No No
    No No
    NDB 7.5 enumeration ON / ON, OFF, FORCE

    DESCRIPTION: Enable or disable the ndb_transid_mysql_connection_map plugin; that is, enable or disable the INFORMATION_SCHEMA table having that name.


    Enables or disables the plugin that handles the ndb_transid_mysql_connection_map table in the INFORMATION_SCHEMA database. Takes one of the values ON, OFF, or FORCE. ON (the default) enables the plugin. OFF disables the plugin, which makes ndb_transid_mysql_connection_map inaccessible. FORCE keeps the MySQL Server from starting if the plugin fails to load and start.

    You can see whether the ndb_transid_mysql_connection_map table plugin is running by checking the output of SHOW PLUGINS.

  • --ndb-wait-connected=seconds

    Table 5.33 Type and value information for ndb-wait-connected

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-wait-connected

    Yes Yes No
    Yes Global No
    NDB 7.5 integer 0 / 0 - 31536000
    5.1.56-ndb-7.0.27 integer 30 / 0 - 31536000
    NDB 7.5 integer 0 / 0 - 31536000
    5.1.56-ndb-7.1.16 integer 30 / 0 - 31536000

    DESCRIPTION: Time (in seconds) for the MySQL server to wait for connection to cluster management and data nodes before accepting MySQL client connections.


    This option sets the period of time that the MySQL server waits for connections to NDB Cluster management and data nodes to be established before accepting MySQL client connections. The time is specified in seconds. The default value is 30.

  • --ndb-wait-setup=seconds

    Table 5.34 Type and value information for ndb-wait-setup

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    ndb-wait-setup

    Yes Yes No
    Yes Global No
    5.1.39-ndb-6.2.19 integer 15 / 0 - 31536000
    5.1.39-ndb-6.3.28 integer 15 / 0 - 31536000
    5.1.39-ndb-7.0.9 integer 15 / 0 - 31536000
    5.1.56-ndb-7.0.27 integer 30 / 0 - 31536000
    5.1.39-ndb-7.1.0 integer 15 / 0 - 31536000
    5.1.56-ndb-7.1.16 integer 30 / 0 - 31536000

    DESCRIPTION: Time (in seconds) for the MySQL server to wait for NDB engine setup to complete.


    This variable shows the period of time that the MySQL server waits for the NDB storage engine to complete setup before timing out and treating NDB as unavailable. The time is specified in seconds. The default value is 30.

  • --server-id-bits=#

    Table 5.35 Type and value information for server-id-bits

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    server-id-bits

    Yes Yes No
    Yes Global No
    NDB 7.5 integer 32 / 7 - 32

    DESCRIPTION: Sets the number of least significant bits in the server_id actually used for identifying the server, permitting NDB API applications to store application data in the most significant bits. server_id must be less than 2 to the power of this value.


    This option indicates the number of least significant bits within the 32-bit server_id which actually identify the server. Indicating that the server is actually identified by fewer than 32 bits makes it possible for some of the remaining bits to be used for other purposes, such as storing user data generated by applications using the NDB API's Event API within the AnyValue of an OperationOptions structure (NDB Cluster uses the AnyValue to store the server ID).

    When extracting the effective server ID from server_id for purposes such as detection of replication loops, the server ignores the remaining bits. The --server-id-bits option is used to mask out any irrelevant bits of server_id in the IO and SQL threads when deciding whether an event should be ignored based on the server ID.

    This data can be read from the binary log by mysqlbinlog, provided that it is run with its own --server-id-bits option set to 32 (the default).

    The value of server_id must be less than 2 ^ server_id_bits; otherwise, mysqld refuses to start.

    This system variable is supported only by NDB Cluster . It is not supported in the standard MySQL 5.7 Server.

  • --skip-ndbcluster

    Table 5.36 Type and value information for skip-ndbcluster

    Command Line System Variable Status Variable
    Option File Scope Dynamic
    From Version Type Default, Range
    Notes

    skip-ndbcluster

    Yes No No
    Yes No

    DESCRIPTION: Disable the NDB Cluster storage engine


    Disable the NDBCLUSTER storage engine. This is the default for binaries that were built with NDBCLUSTER storage engine support; the server allocates memory and other resources for this storage engine only if the --ndbcluster option is given explicitly. See Section 5.1, “Quick Test Setup of NDB Cluster”, for an example.


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