# TEMPLATE -- copy to /etc/sysconfig/arrakis-frame-connector and edit.
#
#     cp /etc/sysconfig/arrakis-frame-connector{.example,}
#
# No instance will start until that copy exists: IMAGE is mandatory and is
# defined only here. This file itself is never read by the service, and a
# package update always refreshes it, so do not edit it in place.
#
# Defaults for all arrakis-frame-connector@ instances. Per-instance files
# (arrakis-frame-connector-<INSTANCE>) ship with the package and override
# these. Not a shell script: no command substitution, no cross-variable
# expansion. Changes take effect on the next restart; no daemon-reload needed.

# --- MUST be set for this site -----------------------------------------------
IMAGE=containers.ligo.org/ngdd/arrakis-lldd-connector:0.7.0
ARRAKIS_SERVER=grpc://arrakis:31206

# --- Usually correct as shipped ----------------------------------------------
RUNAS=arrakis
DATA_ROOT=/kafka/arrakis
FRAME_DURATION=1
RETENTION_TIME=300
SKIP_ALL_GAP=--skip-all-gap
# Off for normal operation. Set to --verbose to turn on connector debug
# logging; it goes to the journal via --log-driver=journald, so leaving it on
# costs journal space on every node.
VERBOSE=
PULL_POLICY=missing

# --- Resource limits ---------------------------------------------------------
# Sized from a 5-minute, 3-instance profile on kafkatest5 (2026-08-14):
# per-container cgroup memory.current 148.6-165.4 MB, peak 167.2 MB;
# CPU ~2% of one core per instance; ~20 threads per instance.
#
# 1g is ~6x the observed peak: enough to absorb page cache (memory.max counts
# it, and frames are written continuously) while still catching a real leak.
MEMORY_LIMIT=1g

# Equal to MEMORY_LIMIT means NO swap allowance. Podman's default when this is
# unset is 2x MEMORY_LIMIT, which would permit swapping on any node that has
# swap enabled. These nodes have none; this makes the intent explicit and
# survives a node that is provisioned differently.
MEMORY_SWAP=1g

# ~12x the observed 20 threads/instance. Podman's own default is 2048.
PIDS_LIMIT=256

# Left unset: 3 instances used 6% of one core total, peaking at 7.8%. Capping
# CPU would mainly throttle the burst while a restarted connector catches up,
# which is exactly when you want it to run fast. arrakis.slice CPUQuota is the
# backstop.
#CPU_LIMIT=

# --- Reaper ------------------------------------------------------------------
# Cutoff derives from RETENTION_TIME * REAPER_MARGIN, floored at
# REAPER_MIN_AGE_SEC. Defaults (4x, 600s) give 1200s at RETENTION_TIME=300.
#REAPER_MARGIN=4
#REAPER_MIN_AGE_SEC=600
