Data Retention
Navigate to System > Retention to configure how long Koios keeps historical data and how aggressively it compresses stored values. The page is organized into three sections: storage monitoring, history compression, and retention policies.
Storage Overview
The storage overview card shows the current state of disk usage on the Koios server.
- Ring indicator — percentage of disk used, color-coded: teal (healthy), orange (above 90%), red (above the alarm limit)
- Free space — remaining capacity in GB
- Daily change rate — average storage consumed or freed per day
- Projected time remaining — estimated days until the disk is full, based on the daily rate
- Daily storage chart — a bar chart showing daily storage deltas for the last 7 days. Green bars indicate growth; blue bars indicate shrinkage (from retention cleanup or manual deletion).
Storage Alarm Limit
Below the chart, a Storage Alarm Limit field sets the disk usage percentage that triggers a storage alarm. This setting saves automatically when changed.
History Compression
History compression controls how tag values are recorded in the time-series database. Rather than storing every single sample, Koios uses Swinging Door Trending (SDT) to discard values that don't meaningfully change the trend.
How SDT Works
SDT maintains a tolerance band — a "door" — around the last recorded point. As new values arrive, the algorithm checks whether they fall inside or outside this band. Values inside the band are redundant (the trend line already represents them) and are discarded. When a value falls outside the band, it is recorded and the door resets.
The width of the door is controlled by the Compression Deviation setting, which is calculated as a percentage of the tag's configured range (Range Min / Range Max). For example, a tag with a range of 0–100 and a 2% deviation has a tolerance band of 2.0 units. A tag with a range of 0–1000 and the same 2% deviation has a tolerance band of 20.0 units.
Settings
When compression is disabled, the deviation and maximum time settings are grayed out — they have no effect until compression is re-enabled.
Per-Tag Compression Overrides
The settings above apply globally to every tag. If a specific tag needs different compression behavior — tighter tolerance for a critical control signal, or compression disabled entirely for a diagnostic value — you can override the global settings on that tag.
On a tag's Configuration tab, the History Compression section has an Override global compression settings toggle. When enabled, three tag-specific settings appear:
When the override is off, the tag uses whatever is configured here on the Retention page. The tag's configuration shows a link back to this page so you can see what the current global settings are.
Tag Range and Compression
Because SDT calculates the tolerance band from the tag's range, an incorrect range can silently prevent historization.
The default tag range is 0–100. If a tag's actual values only span a much narrower band — for example 0–1, 4–20 mA, or 0.0–5.0 — the tolerance band is far too wide relative to the signal. A 1% deviation on a 0–100 range is 1.0 unit, which is larger than the entire 0–1 signal. The result: almost no data points pass the filter, and Trends show flat lines or missing data.
To avoid this, always set each tag's Range Min and Range Max to match the actual expected value range. A tag that reads 0–1 should have its range set to 0–1, not the default 0–100.
Retention Policies
Retention policies control automatic cleanup of old data. Three independent retention periods are configurable:
What's Next
- Tag Introduction — tag configuration including per-tag compression overrides
- Troubleshooting a Tag — diagnosing tag errors including historization issues
- System Overview — disk and hardware details
- Logs — view and stream system logs
