Storage
Changelog (last updated v2.1)
- v2.1: multi-database support
-
As part of the multi-database support, the
memoryCache
anddiskCache
keys were extracted from the local/remote storage.Prior to that, the keys related to the
memoryCache
anddiskCache
were nested under the local/remote storage:storage: !Localpath: /var/lib/xtdb/storage# maxCacheEntries: 1024# maxCacheBytes: 536870912# becamestorage: !Localpath: /var/lib/xtdb/storagememoryCache:# maxSizeRatio: 0.5# maxSizeBytes: 536870912storage: !RemoteobjectStore: <ObjectStoreImplementation>localDiskCache: /var/lib/xtdb/remote-cache# maxCacheEntries: 1024# maxCacheBytes: 536870912# maxDiskCachePercentage: 75# maxDiskCacheBytes: 107374182400# becamestorage: !RemoteobjectStore: <ObjectStoreImplementation>diskCache:path: /var/lib/xtdb/remote-cache# maxSizeRatio: 0.75# maxSizeBytes: 107374182400memoryCache:# maxSizeRatio: 0.5# maxSizeBytes: 536870912
One of the key components of an XTDB node is the storage module - used to store the data and indexes that make up the database.
We offer the following implementations of the storage module:
- In memory: transient in-memory storage.
- Local disk: storage persisted to the local filesystem.
- Remote: storage persisted remotely.
In memory
Section titled “In memory”By default, the storage module is configured to use transient, in-memory storage.
## default, no need to explicitly specify
## storage: !InMemory
Local disk
Section titled “Local disk”A persistent storage implementation that writes to a local directory, also maintaining an in-memory cache of the working set.
storage: !Local # -- required
# The path to the local directory to persist the data to. # (Can be set as an !Env value) path: /var/lib/xtdb/storage
### -- optional## configuration for XTDB's in-memory cache## if not provided, an in-memory cache will still be created, with the default sizememoryCache: # The maximum proportion of the JVM's direct-memory space to use for the in-memory cache (overridden by maxSizeBytes, if set). # maxSizeRatio: 0.5
# The maximum number of bytes to store in the in-memory cache (unset by default). # maxSizeBytes: 536870912
Remote
Section titled “Remote”A persistent storage implementation that:
- Persists data remotely to a provided, cloud based object store.
- Maintains an local-disk cache and in-memory cache of the working set.