optimize

Description

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. If numactl is installed on the host, optimize will set up NUMA binding based on the number of NUMA nodes on the host and the number of leaf nodes created.

  • Sets the engine variables default_partitions_per_leaf and expected_leaf_core_count 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

Usage:
sdb-admin optimize [flags]
For flags that can accept multiple values (indicated by VALUES after the name of the flag),
separate each value with a comma.
Flags:
-h, --help Help for optimize
--memory-percentage INT The percentage of memory on each host to use for SingleStore
--no-numa Do not change NUMA settings on any SingleStore 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 color output in console, which some terminal sessions/environments may have difficulty 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-control-persist SECONDS Enable SSH ControlPersist and set it to the specified duration in seconds
--ssh-max-sessions POSITIVE_INTEGER Maximum number of SSH sessions to open per host, must be at least 3
--ssh-strict-host-key-checking Enable strict host key checking for SSH connections
--ssh-user-known-hosts-file FILE_PATH Path to the user known_hosts file for SSH connections. If not set, /dev/null will be used
--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

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

Last modified: October 6, 2023

Was this article helpful?