Setting the Blob Cache

The blob cache is a local cache of data from an unlimited storage database, also known as a "bottomless" database. Refer to Local and Unlimited Database Storage Concepts for information on unlimited storage databases.

Blob Cache Size Engine Variables

The size of the blob cache is controlled by the following engine variables:

Name

Description

maximum_blob_cache_size_mb

Specifies the maximum blob cache size per leaf node. This variable does not sync between nodes. This variable is updated when maximum_blob_cache_size_percent is changed.

maximum_blob_cache_size_percent

Sets the maximum percent of disk space that can be used by the blob cache.

maximum_blob_cache_shrink_percent_under_default_spilling_max

Controls the maximum amount of automatic shrinking of the blob cache.

Updates to the maximum_blob_cache_size_mb and maximum_blob_cache_size_percent engine variable function as follows:

  • Changing maximum_blob_cache_size_percent changes the value of maximum_blob_cache_size_mb and changes the size of the blob cache.

  • Changing maximum_blob_cache_size_mb changes the value of maximum_blob_cache_size_mb and the size of the blob cache but does not update maximum_blob_cache_size_percent.

  • The maximum_blob_cache_size_percent engine variable can be "out of date" if you set maximum_blob_cache_size_mb after setting maximum_blob_cache_size_percent.

  • On a restart, maximum_blob_cache_size_percent takes precedence, and sets maximum_blob_cache_size_mb to the corresponding value.

Note

SingleStore recommends using only one of the maximum_blob_cache_size_percent and maximum_blob_cache_size_percent engine variables at a time.

Details related to the blobs cached in the blob cache and events on those blobs are found in the information schema views MV_CACHED_BLOBS and MV_BLOB_CACHE_EVENTS.

Automatic Resizing of Blob Cache and Blob Cache Shrink Percent Engine Variable

When the disk on which the blob cache is mounted begins to fill, the blob cache automatically shrinks. Thus, anything that uses disk space – logs, trace logs, plancache, audit logs, and files outside the engine – can steal space from the blob cache.

The amount of blob cache shrinking is configurable and is controlled by the maximum_blob_cache_shrink_percent_under_default_spilling_max engine variable.

For example, if maximum_blob_cache_shrink_percent_under_default_spilling_max is set to 0.3, the blob cache can shrink to 70% of the configured size of the blob cache. That is the blob cache can shrink to: (maximum_blob_cache_size_mb* (1- 30%).

The maximum_blob_cache_shrink_percent_under_default_spilling_max engine variable only controls the maximum amount of blob cache shrinkage when spilling_maximum_disk_percent is equal to -1, which is the default value.  When spilling_maximum_disk_percent is set to a value other than -1, query spilling takes precedence and the engine may shrink the blob cache more than the percentage specified by maximum_blob_cache_shrink_percent_under_default_spilling_max.

Refer to Engine Variables for details on the engine variables.

Last modified: June 11, 2025

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