Summary variables
The following are summary variables that describe overall memory use:
Total_server_memory
: Tracks the server’s overall memory use. SingleStore DB will not let this value grow higher thanmaximum_memory
. WhenTotal_server_memory
reachesmaximum_memory
, memory allocations will start failing. Queries will then fail with the error1712 - "Not enough memory available to complete the current request. The request was not processed."
In addition, the trace log will show the following:
"Nonfatal buffer manager memory allocation failure. The maximum_memory parameter (XXXXX MB) has been reached."
Alloc_table_memory
: Tracks the memory stored inside of all rowstore tables (memory for rows, indexes, variable-length columns likeVARCHAR
orJSON
that are stored off row). OnceAlloc_table_memory
reachesmaximum_table_memory
,INSERT
,UPDATE
, andLOAD DATA
operations against the tables will receive the following error:1720 - "Memory usage by SingleStore DB for tables (XXXXX MB) has reached the value of 'maximum_table_memory' global variable (YYYYY MB). This query cannot be executed.".
Buffer_manager_memory
: Tracks memory that is allocated by the Buffer Manager for SingleStore DB’s built-in memory allocators. The Buffer Manager is a component that consumes memory from the Linux OS in 128KB blocks and manages that memory out to memory allocators used by rowstore tables or by query execution. If your application makes heavy use of rowstore tables, it’s normal forBuffer_manager_memory
to be a large percentage ofTotal_server_memory
.Buffer_manager_cached_memory
: Tracks memory that was allocated by the Buffer Manager, but is now cached and not in use. If you notice that your overall memory usage for SingleStore DB is much higher than your table memory usage, this cache may be the reason.Buffer_manager_cached_memory
is capped at 25% ofmaximum_memory
. SingleStore DB will return freed memory to Linux onceBuffer_manager_cached_memory
is at 25% ofmaximum_memory
. For more information, see Configuring Memory Limits.Alloc_query_execution
: Tracks memory allocated by currently executing queries for sorts, hash tables, result tables, etc. If no queries are running, this value should be 0.Alloc_variable
: Tracks memory allocated for variable-length columns inside rowstore tables, or for other variable-length memory allocations inside query execution (i.e. temporary allocations inside of string expressions, etc.).