Skip to content

Reference

Configuration

Settings come from a config file, the command line, or both. Command line arguments are applied last, so they win. Every parameter is readable with CONFIG GET, and all but bind and port can be changed at runtime.

Where settings come from

terminal
# positional: port, then dump file
klyro 7171 klyro.dump

# a config file
klyro klyro.conf

# a config file plus an override that wins
klyro --config klyro.conf 7200

The file format is one name value pair per line. Everything after a # is a comment, blank lines are ignored, and every value in klyro.conf.sample is the default, so an empty file behaves exactly like no file at all.

Network

ParameterDefaultMeaning
bind0.0.0.0Address to listen on. Restart required.
port7171Port to listen on. Restart required.
maxclients10000Concurrent connections before new ones are refused

Persistence

ParameterDefaultMeaning
dbfilenameklyro.dumpSnapshot path, loaded at startup if present
save-interval60Seconds between autosave checks; a save only happens if something changed

Keyspace and protocol

ParameterDefaultMeaning
sweep-interval1000Milliseconds between active expiry sweeps
max-string-bytes536870912Largest value a string may grow to
proto-max-bulk-len536870912Largest bulk string one argument may carry
client-output-buffer-limit268435456Unsent reply allowed to pile up per client
scan-default-count10COUNT used by SCAN when the caller gives none
zadd-max-pairs128Most score/member pairs one ZADD may carry
maxmemory0Bytes the process may hold before eviction starts; 0 is no limit
maxmemory-policynoevictionWhich key to drop at the limit; one of the eight Redis policies
maxmemory-samples5Keys sampled per eviction round

Memory indexes

ParameterDefaultMeaning
mem-max-topk100Ceiling on a memory query's TOPK
mem-max-candidates500Candidates each index contributes before fusion
mem-max-scan1000000Ceiling on vector comparisons in one query
mem-max-dim4096Widest embedding an index may be created with
mem-max-text-bytes65536Ceiling on one record's text
mem-max-records0Records per index; 0 means no limit
mem-max-terms-per-doc1024Tokenizer cap, so one document cannot dominate the index
mem-recency-halflife604800Default half-life for a new index, in seconds

Changing settings at runtime

klyro
CONFIG GET mem-*
 1) "mem-max-topk"          2) "100"
 3) "mem-max-candidates"    4) "500"
 5) "mem-max-scan"          6) "1000000"
 7) "mem-max-dim"           8) "4096"
 9) "mem-max-text-bytes"   10) "65536"
11) "mem-max-records"      12) "0"
13) "mem-max-terms-per-doc" 14) "1024"
15) "mem-recency-halflife" 16) "604800"

CONFIG SET mem-max-topk 250
+OK

CONFIG SET port 7200
-ERR parameter cannot be changed at runtime

CONFIG RESETSTAT
+OK

INFO reports what the server is doing, one text blob of # Section headers over key:value lines. Ask for one section by name, including the memory-specific one: INFO memorydb.