Database: blob settings

Blob settings valid for direct, relstorage, and zeo storage backends.

Note

These settings are not used with PGJsonb, which manages blobs through its own settings. See Database: PGJsonb.

Note

When the z3blobs S3 wrapper is enabled (db_z3blobs_enabled: true), these blob settings are automatically suppressed. The wrapper handles all blob operations. See Database: S3 blob wrapper (z3blobs).

See How blob storage works for background on how blobs work across backends.

Setting

Default

Allowed Values

db_blob_mode

shared

shared, cache

db_blob_location

{{ cookiecutter.location_clienthome }}/blobs

path

db_blob_cache_size

6312427520 (~5 GB)

integer (bytes)

db_blob_cache_size_check

10

integer (percent)

Attention

Do not forget to set db_blob_mode to cache if you use RelStorage!

db_blob_mode – Set if blobs are stored shared within all clients or are they stored on the storage backend and the client only operates as temporary cache. For direct storage only shared applies (operates like shared with one single client).

db_blob_location – The name of the directory where the ZODB blob data or cache (depends on db_blob_mode) will be stored.

db_blob_cache_size – Set the maximum size of the blob cache, in bytes. With many blobs and enough disk space on the client hardware this should be increased. If not set, then the cache size isn’t checked and the blob directory will grow without bound. Only valid for db_blob_mode cache.

db_blob_cache_size_check – Set the ZEO check size as percent of db_blob_cache_size (for example, 10 for 10%). The ZEO cache size will be checked when this many bytes have been loaded into the cache. Only valid for db_blob_mode cache.