On this page
Recommends best practices and optimizes the cluster for maximum performance.
This command makes or recommends the following best practices:
By default, if
--memory-percentageis not specified, sets
maximum_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.
--memory-percentageis specified, sets
maximum_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.
numactlis 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
partitions_ per_ leaf
expected_on each host if the
leaf_ core_ count
--no-partition-changeflag 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_will be set to either 1 or the number of cores over the number of leaf nodes, whichever is greater.
partitions_ per_ leaf
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]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 SingleStoreDB--no-numa Do not change NUMA settings on any SingleStoreDB nodes--no-partition-change Do not change partitions on leavesGlobal 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
This command is interactive unless you use either
--json flag to override interactive behavior.
Last modified: October 6, 2023