Skip to Content
Client Configuration

Client Configuration

This document describes the configuration options for the Spiral client.

Configuration can be set via:

  • File: ~/.spiral.toml
  • Environment variables: Prefixed with SPIRAL__ (double underscore)
  • Runtime overrides: Override values when initializing the client, using the dot notation

Top level

Main configuration for the Spiral client, that can affect many different parts of the client.

FieldDefaultEnvironment VariableDescription
file_formatvortexSPIRAL__FILE_FORMATFile format for table storage

Authn

Authentication related settings

FieldDefaultEnvironment VariableDescription
authn.device_codefalseSPIRAL__AUTHN__DEVICE_CODEWhether to force device code authentication flow. This exist as an override when e.g. ssh-ing into an environment machine.
authn.token-SPIRAL__AUTHN__TOKENOptional authentication token

Cache

Client cache limits and constraints

FieldDefaultEnvironment VariableDescription
cache.enabledfalseSPIRAL__CACHE__ENABLEDCache is currently disabled by default.
cache.memory_capacity_bytes2 * (1 << 30)SPIRAL__CACHE__MEMORY_CAPACITY_BYTESMemory cache size in bytes.
cache.disk_capacity_bytes20 * (1 << 30)SPIRAL__CACHE__DISK_CAPACITY_BYTESDisk cache size in bytes.
cache.disk_path-SPIRAL__CACHE__DISK_PATHDisk cache path override. If not set, defaults to $XDG_CACHE_HOME/spiral or ~/.cache/spiral

Limits

Client resource limits and constraints

FieldDefaultEnvironment VariableDescription
limits.batch_readaheadmin (num_cpus :: get ()SPIRAL__LIMITS__BATCH_READAHEADMaximum number of concurrent shards to evaluate, “read ahead”, when scanning. Defaults to min(number of CPU cores, 64).
limits.partition_max_bytes128 * 1024 * 1024SPIRAL__LIMITS__PARTITION_MAX_BYTESMaximum number of bytes in an uncompressed fragment file.
limits.transaction_retries3SPIRAL__LIMITS__TRANSACTION_RETRIESMaximum number of transaction retries on conflict before giving up.
limits.transaction_manifest_max_rows-SPIRAL__LIMITS__TRANSACTION_MANIFEST_MAX_ROWSMaximum number of rows in manifest when compacting transaction.
limits.key_space_max_rows100_000_000SPIRAL__LIMITS__KEY_SPACE_MAX_ROWSMaximum number of rows in a key space. Compaction keeps fragments across column groups aligned to L1 key spaces. When this limit is larger, the L1 key spaces might change more frequently, causing a re-alignment to happen. When this limit is smaller, more fragments may have to be split due to key space boundaries.
limits.http_max_retries10SPIRAL__LIMITS__HTTP_MAX_RETRIESMaximum number of HTTP request retries on transient errors.
limits.write_max_concurrencyNoneSPIRAL__LIMITS__WRITE_MAX_CONCURRENCYMaximum number of concurrent write operations when writing table fragments.
limits.scan_max_concurrency16SPIRAL__LIMITS__SCAN_MAX_CONCURRENCYMaximum number of concurrent operations when evaluating multiple nodes during scans.
limits.fragment_cache_bytes256 * 1024 * 1024SPIRAL__LIMITS__FRAGMENT_CACHE_BYTESMaximum in-memory footprint (in bytes) of the fragment cache.

Server

API endpoint configuration for the Spiral control plane

FieldDefaultEnvironment VariableDescription
server.urlhttps://api.spiraldb.comSPIRAL__SERVER__URLThe SpiralDB API endpoint URL

Spfs

SpFS (Spiral File System) configuration

FieldDefaultEnvironment VariableDescription
spfs.urlhttps://spfs.spiraldb.devSPIRAL__SPFS__URLThe SpFS (Spiral File System) endpoint URL
Last updated on