4.1.2. Enabling Parallel Apply

Parallel apply is enabled using the --svc-parallelization-type and --channels options of tpm. The parallelization type defaults to none which is to say that parallel apply is disabled. You should set it to disk. The --channels option sets the the number of channels (i.e., threads) you propose to use for applying data. Here is a code example of master-slave installation with parallel apply enabled. The slave will apply transactions using 30 channels.

shell> ./tools/tpm install myservice 
  --topology=master-slave \
  --master-host=logos1  \
  --datasource-user=tungsten  \
  --datasource-password=secret  \
  --home-directory=/opt/continuent \
  --cluster-hosts=logos1,logos2 \
  --svc-parallelization-type=disk \
  --channels=30 \

If the installation process fails, check the output of the /tmp/tungsten-configure.log file for more information about the root cause.

There are several additional options that default to reasonable values. You may wish to change them in special cases.

  • --buffer-size — Sets the replicator block commit size, which is the number of transactions to commit at once on slaves. Values up to 100 are normally fine.

  • --native-slave-takeover — Used to allow Tungsten to take over from native MySQL replication and parallelize it. See here for more.