SingleStore DB

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 than maximum_memory. When Total_server_memory reaches maximum_memory, memory allocations will start failing. Queries will then fail with the error 1712 - "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 like VARCHAR or JSON that are stored off row). Once Alloc_table_memory reaches maximum_table_memory, INSERT, UPDATE, and LOAD 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 for Buffer_manager_memory to be a large percentage of Total_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% of maximum_memory. SingleStore DB will return freed memory to Linux once Buffer_manager_cached_memory is at 25% of maximum_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.).