MySQL™ Cluster Manager 1.4.8 User Manual

4.4.9 The autotune Command

autotune [--dryrun] [--sequential-restart] [--writeload=writeload] template cluster_name



The command autotune a number of parameters for the cluster according to the specified values for the template argument and the [optional] writeload option, in order to optimize the cluster's performance.

The valid values for template are:

The valid values for --writeload are:

The cluster must be in the created or fully operational status for this command to work, or an error will result. The command tunes the cluster by issuing a number of set commands to adjust different parameters, and then performs a rolling restart for the cluster. For MySQL Cluster Manager 1.4.8 and later, use the --sequential-restart option to make the rolling restart a sequential one.

When the --dryrun option is used, the command does not make any actual changes to the cluster, but writes the set commands that it will issue for tuning into the file /path-to-mcm-data-repository/clusters/clustername/tmp/autotune.message_id.mcm.

mcm> autotune --dryrun --writeload=high realtime mycluster;
| Command result                                                                                                                                                     |
| Autotuning calculation complete. Please check /opt/mcm_data/clusters/mycluster/tmp/autotune.30fcce24_2184_0.mcm on host flundra for settings that will be applied. |
1 row in set (0.62 sec)

shell> cat /opt/mcm_data/clusters/mycluster/tmp/autotune.30fcce24_2184_0.mcm
# The following will be applied to the current cluster config:
set HeartbeatIntervalDbDb:ndbmtd=1500 mycluster;
set HeartbeatIntervalDbApi:ndbmtd=1500 mycluster;
set RedoBuffer:ndbmtd=64M mycluster;
set SharedGlobalMemory:ndbmtd=20M mycluster;
set DataMemory:ndbmtd=83886080 mycluster;
set IndexMemory:ndbmtd=18874368 mycluster;
set MaxNoOfExecutionThreads:ndbmtd=2 mycluster;
set FragmentLogFileSize:ndbmtd=256M mycluster;
set NoOfFragmentLogFiles:ndbmtd=3 mycluster;

After checking out those changes in the .mcm file, if you do not want to apply all of them to your cluster, you can edit the .mcm file as desired, and then execute it at the mcm client (see Section, “Creating and Configuring the Target Cluster” for how to do that). If you are happy with all the changes described in the file, issue the autotune command again without the --dryrun option, to perform the tuning:

mcm> autotune --writeload=high realtime mycluster;
| Command result                                      |
| Cluster successfully autotuned to template realtime |
1 row in set (2 min 58.09 sec)


The command is supported only for MySQL NDB Cluster 7.4 and later.