Systems Tuning
Calculating Exact Mem_Buf_Limit to Prevent Linux OOM-Kills
Understand how Mem_Buf_Limit caps input ingestion per plugin and why summing multiple [INPUT] sections plus chunk metadata must fit under cgroup limits.
Formula: Sum(Mem_Buf_Limit) * 1.35 + 24 MB Base <= Pod Limit
Why Mem_Buf_Limit Alone Does Not Equal Total Process RSS
Mem_Buf_Limit governs data chunks created by one [INPUT] plugin, excluding base daemon libraries, SQLite DB WAL buffers, regex states, and compressed output payloads in flight. Always multiply total Mem_Buf_Limit across all inputs by 1.35x plus 24 MB base.
Combining Mem_Buf_Limit With Filesystem Storage
When storage.type=filesystem is active, storage.max_chunks_up governs global hot chunk RAM across inputs, while Mem_Buf_Limit still acts as a safety cap on un-flushed input bursts.
Measured Parameters & Shipper Configuration Directives
| Parameter / Variable | Recommended Formula | Operational Reason |
|---|---|---|
| Single Input Mem_Buf_Limit | 10M (DaemonSet) / 32M-64M (Aggregator) | Caps uncompressed chunk allocation for that specific [INPUT] |
| Multi-Input Multiplier | Sum(All Inputs) * 1.35 | Accounts for filter copies, parser allocations, and output buffers |
| Pod / Node Safety Margin | Leave >= 25% cgroup headroom | Absorbs sudden JSON escape expansions and TLS socket buffers |
| When Limit Hits (Mem Mode) | Input pauses tailing until flush frees RAM | Protects host kernel at cost of temporary disk read lag |