Watch the 7.3 Webinar On-Demand
This new release brings updates to Universal Storage, query optimization, and usability that you won’t want to miss.

optimize

Info

SingleStore Managed Service does not support this command.

Recommends best practices and optimizes the cluster for maximum performance.

Usage

Recommends best practices and optimizes the cluster for maximum performance.
This command makes or recommends the following best practices:
  · By default, if --memory-percentage is not specified, sets maximum_memory to either 90% of the total RAM available to a leaf node, or to the total RAM available to the leaf node minus 10GB, whichever is greater.
  · If --memory-percentage is specified, sets maximum_memory to that percentage of the total RAM available to a leaf node.
  · If there are multiple leaf nodes on the same host, the memory allocation will be divided evenly among the leaf nodes.
  · Queries for the NUMA node count on the host machine. If numactl is installed on the host machine, optimize will set up NUMA binding based on the number of NUMA nodes on the machine and the number of leaf nodes created.
  · Sets the default_partitions_per_leaf engine variable on each host if the --no-partition-change flag is NOT specified and if each host has the same number of cores and the same number of leaf nodes. If these two conditions are met, default_partitions_per_leaf will be set to either 1 or the number of cores over the number of leaf nodes, whichever is greater.
  · Alerts if memory allocation per leaf node varies across the cluster outside of an acceptable margin. Memory allocation per leaf node is the host memory divided by the number of leaf nodes present on that host.
  · Recommends that you install new leaf nodes if the number of leaf nodes is less than what is recommended by the NUMA configuration.

Usage:
  sdb-admin optimize [flags]

Flags:
  -h, --help                    Help for optimize
      --memory-percentage INT   The percentage of memory on each host to use for SingleStore DB
      --no-numa                 Do not change NUMA settings on any SingleStore DB nodes
      --no-partition-change     Do not change partitions on leaves

Global Flags:
      --backup-cache FILE_PATH              File path for the backup cache
      --cache-file FILE_PATH                File path for the Toolbox node cache
  -c, --config FILE_PATH                    File path for the Toolbox configuration
      --disable-colors                      Disable colored output in console, which some terminal sessions/environments may have issues with
      --disable-spinner                     Disable the progress spinner, which some terminal sessions/environments may have issues with
  -j, --json                                Enable JSON output
      --parallelism POSITIVE_INTEGER        Maximum number of operations to run in parallel
      --runtime-dir DIRECTORY_PATH          Where to store Toolbox runtime data
      --ssh-max-sessions POSITIVE_INTEGER   Maximum number of SSH sessions to open per host, must be at least 3
      --state-file FILE_PATH                Toolbox state file path
  -v, --verbosity count                     Increase logging verbosity: valid values are 1, 2, 3. Usage -v=count or --verbosity=count
  -y, --yes                                 Enable non-interactive mode and assume the user would like to move forward with the proposed actions by default

Remarks

The optimize command will make or recommend the following best practices:

  • By default, if --memory-percentage is not specified, sets maximum_memory to either 90% of the total RAM available to a leaf node, or to the total RAM available to the leaf node minus 10GB, whichever is greater.
  • If --memory-percentage is specified, sets maximum_memory to that percentage of the total RAM available to a leaf node.
  • If there are multiple leaf nodes on the same host, the memory allocation will be divided evenly among the leaf nodes.
  • Queries for the NUMA node count on the host machine. If numactl is installed on the host machine, optimize will set up NUMA binding based on the number of NUMA nodes on the machine and the number of leaf nodes created.
  • Sets the default_partitions_per_leaf engine variable on each host if the --no-partition-change flag is NOT specified and if each host has the same number of cores and the same number of leaf nodes. If these two conditions are met, default_partitions_per_leaf will be set to either 1 or the number of cores over the number of leaf nodes, whichever is greater.
  • Alerts if memory allocation per leaf node varies across the cluster outside of an acceptable margin. Memory allocation per leaf node is the host memory divided by the number of leaf nodes present on that host.
  • Recommends that you install new leaf nodes if the number of leaf nodes is less than what is recommended by the NUMA configuration.

This command is interactive unless you use either the --yes or --json flags to override interactive behavior.