Setting the Blob Cache
The blob cache is a disk cache of data in a remote object store.
Its size is controlled by the following engine variables:
-
maximum_
which is set to a default value at startup based on the size of the disk that it is mounted on.blob_ cache_ size_ mb -
maximum_
is zero by default and has no effect.blob_ cache_ size_ percent
When the disk space on the disk it’s mounted on starts getting filled up and stored files/objects need more space, the blob cache starts shrinking itself.
Changing maximum_
changes maximum_
but then you can reset maximum_
again.maximum_
is the 'source of truth' and maximum_
can be 'out of date' if you reset maximum_
after setting maximum_
.maximum_
will take priority and set maximum_
to the corresponding value.
Example:
//Assume you are using a 1 TB disk and
maximum_blob_cache_size_mb = 800GB // for example
maximum_blob_cache_size_percent = 0
maximum blob cache size = 800GB
SET maximum_blob_cache_size_percent = 0.50;
//Now
maximum_blob_cache_size_mb = 500GB
maximum_blob_cache_size_percent = 0.50
maximum blob cache size = 500GB
SET maximum_blob_cache_size_mb = 800GB;
maximum_blob_cache_size_mb = 800GB
maximum_blob_cache_size_percent = 0.50
maximum blob cache size = 800GB
// On restarting the node
maximum_blob_cache_size_mb = 500GB
maximum_blob_cache_size_percent = 0.50
maximum blob cache size = 500GB
SingleStore does not recommend using both variables at the same time, only one or the other.
Details related to the blob cache are found in the information schema tables mv_
and mv_
.
Last modified: March 8, 2024