Systems Tuning
Filesystem Buffering & storage.max_chunks_up (2 MB Chunk Math)
Size storage.max_chunks_up so hot chunks stay in RAM for speed while excess 2 MB .flb chunks spill transparently to SSD/NVMe during sink outages.
2 MB / Chunk · 128 Chunks = ~256 MB Hot RAM · Disk Spillover
How UP vs DOWN Chunks Work in Fluent Bit
Fluent Bit writes incoming records into 2 MB chunks. Up to storage.max_chunks_up chunks remain memory-mapped (UP) for fast delivery; once exceeded, new chunks transition to DOWN state on disk, consuming zero heap RAM until output drains.
Avoiding fsync Storms with storage.sync normal
Setting storage.sync=full forces an fsync syscall on every chunk write, saturating slower virtual disks. Keep storage.sync=normal for 99% of container and web log pipelines.
Measured Parameters & Shipper Configuration Directives
| [SERVICE] Directive | Recommended Setting | Operational Reason |
|---|---|---|
| storage.path | /var/log/flb-storage/ | Dedicated SSD/NVMe directory for .flb chunk files |
| storage.max_chunks_up | 64 (128 MB) / 128 (256 MB) / 256 (512 MB) | Each chunk averages ~2 MB in memory when status is UP |
| storage.sync | normal (full only for strict audit) | Avoids fsync() IOPS bottleneck at 25k+ EPS |
| storage.backlog.mem_limit | 10M - 20M | Controls RAM speed when replaying old DOWN chunks post-outage |