Configuration reference

Configuration reference

Everything LessDB can be told, where it lives, and how to change it. Configuration is validated on load and save — a bad value fails fast with a clear message instead of misbehaving later.

Where config lives

<data_dir>/config.json — written by less init, read by every command and the embedded SDKs. All knobs have sane defaults; you only set what you care about.

less init --dir /data/mydb \
  --shared s3://bucket/prefix \
  --memory-limit 40GiB \
  --compression lz4 \
  --flush-rows 1000000 \
  --max-merge-rows 8388608 \
  --block-cache-bytes 1073741824 \
  --no-wal

Every less init flag also has a LESSDB_* environment variable (see less init --help). Flags/env write config.json once; the file stays the source of truth afterwards — edit it directly and restart.

Storage & durability

keydefaultwhat it does
data_dir.lessroot of the database directory
shared_urlnoneobject-storage URL for SharedMergeTree tables: s3://bucket/prefix, gcs://…, az://…, file:///path, memory://
wal_enabledtruewrite-ahead log for insert durability (--no-wal disables)
wal_fsynctruefsync every WAL append before acknowledging

Parts & merging

keydefaultwhat it does
flush_rows262144buffered rows per table before flushing into an immutable part
max_buffer_rows1048576hard cap; flush even mid-batch
target_part_bytes268435456target part size for background merging
auto_merge_parts8run an optimize once a table has this many parts
max_merge_rows4194304cap on input rows per merge pass — bounds merge memory (a 100M-row table converges in bounded passes)

Compression

keydefaultwhat it does
compressionzstdzstd \lz4 \none, per column
zstd_level30 = library default, 1..=22

Query engine

keydefaultwhat it does
memory_limit0query memory pool cap in bytes (0 = unbounded). Over-limit queries fail with ResourcesExhausted instead of OOM-ing the box
parquet_page_indextruepage-level skipping toggle (off = row-group statistics only)
gpu_enabledfalseenable the wgpu kernels

Shared-storage cache

keydefaultwhat it does
block_cache_bytes268435456in-memory LRU for shared parts
block_cache_dirnoneoptional persistent disk tier (survives restarts)

Security

keydefaultwhat it does
authnoneLDAP/AD and/or dev-file authenticator JSON (less init --auth @auth.json)
tls_cert / tls_keynonePEM files for HTTPS on less server
node_idrandomstable compute-node identity for multi-writer merge claims

Logging

less server --log-level <off|error|warn|info|debug|trace> --log-dir <dir>:

Validation rules

Invalid config is rejected at load/save time: compression must be zstd/lz4/none, zstd_level 0..=22, flush_rows ≥ 1, max_buffer_rowsflush_rows, max_merge_rows ≥ 1, and bloom_fp_rate in (0, 1).

Per-table settings

Compression is also per-table DDL: COMPRESSION='lz4'. Sort key, UNIQUE columns, and TTL live in the table definition, not the config file — see Getting started.