Configuring SingleStoreDB for NUMA
On this page
Typically, multi-processor hosts provide for non-uniform memory access, or NUMA.
When running SingleStoreDB on hosts with multiple NUMA nodes, you should configure SingleStoreDB for NUMA with numactl
for optimal performance.
To simplify the configuration process, the SingleStoreDB management tools (sdb-admin
, memsqlctl
, etc.numactl
to bind individual SingleStoreDB nodes to NUMA nodes.
Configuring a new cluster for NUMA
-
On each host that will contain SingleStoreDB leaf nodes, create one leaf per NUMA node by running
sdb-admin create-node
and thensdb-admin add-leaf
until you have the same number of SingleStoreDB leaf nodes as NUMA nodes.You will need to provide a different --port
argument for each SingleStoreDB node on the same host.For example, on a host with two NUMA nodes, you would deploy two leaf nodes.
sdb-admin create-node --host <hostname|IP> --port 3307 --password <secure_pass>sdb-admin create-node --host <hostname|IP> --port 3308 --password <secure_pass># Assign the nodes the role of "leaf" and add them to the cluster.sdb-admin list-nodes -q -r unknown | xargs -I % sdb-admin add-leaf --memsql-id % -y -
Run
sdb-admin optimize
and confirm the prompt.sdb-admin optimizeThis will configure
numactl
to bind SingleStoreDB nodes to NUMA nodes, and configure SingleStoreDB memory settings.See sdb-admin optimize for more information.
-
Restart the cluster for the configuration changes to take effect.
sdb-admin restart-node --all
Reconfiguring an existing cluster for NUMA
-
Follow the steps in the previous section to deploy and optimize your leaf nodes.
-
Rebalance all SingleStoreDB databases by running REBALANCE ALL DATABASES.
REBALANCE ALL DATABASES;
Last modified: October 31, 2023