Skip to main content

Changing SingleStoreDB's Memory Limits After Modifying System Memory Capacity

The maximum_memory and maximum_table_memory engine variables settings are configured by default in your memsql.cnf files for each node based on physical host memory capacity when SingleStoreDB is installed. This setting is not automatically changed when the system's memory capacity changes. This is to avoid unintentionally allowing SingleStoreDB to use more memory than desired.

After changing the system memory capacity, to change memory limits and optimize other configurations, you can run:

sdb-admin optimize

This will automatically reset memory limits based on the available amount of system memory.

To change the individual memory limits, you can run:

sdb-admin update-config --set-global --key maximum_memory --value <value_in_mb>
sdb-admin update-config --set-global --key maximum_table_memory --value <value_in_mb>

To decrease memory limits you must restart the affected nodes after changing the value of maximum_memory and maximum_table_memory.

You cannot set maximum_memory to a value lower than 1GB.

Before lowering maximum_memory you must make sure the value of the summary variable, Total_server_memory does not exceed the proposed new value for maximum_memory.

Before lowering maximum_table_memory you must make sure the value of the summary variable, Alloc_table_memory does not exceed the proposed new value for maximum_memory.

You should lower maximum_table_memory before lowering maximum_memory.