maximum_memory

Note

This page applies only to versions before 8.1.

For 8.1 and later versions refer to Disk Spilling

SingleStore will not allocate more than maximum_memory megabytes of memory. If a SELECT query’s memory allocations put the memory usage by SingleStore over maximum_memory, query execution stops and an error message is generated.

By default, maximum_memory is set to 90% of the physical memory on the host, or physical memory minus 10GB, whichever value is greater.

As Kubernetes does not support swap, maximum_memory for the Operator is set to 90% of physical memory, or physical memory minus 10 GB, whichever is larger

Query compilations whose allocations exceed this limit will also terminate the server. See Code Generation for more information on query compilations.

SingleStore supports disk spilling. Instead of query failure, disk spilling allows query execution to continue by moving certain query operators onto disk and out of memory.

When a node's memory load is above 75% and in-memory data structures (for the current thread) are at least 100MB, the intermediate result of the operation spills to disk in the data/spill directory. The node memory load ratio and threshold are configurable variables: spilling_node_memory_threshold_ratio and spilling_query_operator_memory_threshold, respectively. Disk spilling will usually reduce memory usage (can spill at most 64x physical memory), but may result in longer execution time. SingleStore recommends using an SSD for the spilling directory since it can result in up to a tenfold increase in performance.

Currently, the following query operator(s) can be spilt onto disk:

  • GROUP BY

Note

Disk spilling must be enabled by setting the engine variable, enable_spilling to ON. Starting with version 7.8, ON is the default value for enable_spilling. See the Sync Variables Lists page for more information.

Last modified: October 24, 2024

Was this article helpful?

Verification instructions

Note: You must install cosign to verify the authenticity of the SingleStore file.

Use the following steps to verify the authenticity of singlestoredb-server, singlestoredb-toolbox, singlestoredb-studio, and singlestore-client SingleStore files that have been downloaded.

You may perform the following steps on any computer that can run cosign, such as the main deployment host of the cluster.

  1. (Optional) Run the following command to view the associated signature files.

    curl undefined
  2. Download the signature file from the SingleStore release server.

    • Option 1: Click the Download Signature button next to the SingleStore file.

    • Option 2: Copy and paste the following URL into the address bar of your browser and save the signature file.

    • Option 3: Run the following command to download the signature file.

      curl -O undefined
  3. After the signature file has been downloaded, run the following command to verify the authenticity of the SingleStore file.

    echo -n undefined |
    cosign verify-blob --certificate-oidc-issuer https://oidc.eks.us-east-1.amazonaws.com/id/CCDCDBA1379A5596AB5B2E46DCA385BC \
    --certificate-identity https://kubernetes.io/namespaces/freya-production/serviceaccounts/job-worker \
    --bundle undefined \
    --new-bundle-format -
    Verified OK