Do not reserve one unbounded pool for Docker logs. Set per-container rotation and maintain a separate host free-space floor. A practical starting point is 30–100MB for routine containers, with larger limits only for services whose troubleshooting window requires them.
Total space equals per-container limit multiplied by container count, plus daemon, journald, application, crash, and temporary logs. The correct reserve must also keep image pulls, updates, and container restarts working during a logging spike. This distinction sets the measurement method, safety margin, and stop condition. This distinction sets the measurement method, safety margin, and stop condition.
Build the budget from each log producer
Inventory the Docker logging driver, container count, log rate, retention window, and any application logs written inside volumes. Rotating stdout does not limit a separate log file created by the application.
For `json-file`, `max-size=10m` and `max-file=3` bounds retained files near 30MB per container. The `local` driver adds compression and bounded rotation, but existing containers may need recreation to adopt changed defaults.
Reserve additional system-disk headroom for images, writable layers, package updates, and emergency diagnostics. Do not let the log budget consume the last usable space on `/var/lib/docker`.
Alert on rate and free space, not size alone
Track bytes per container, growth per hour, rotation events, filesystem free bytes, and inode use. A sudden rate change often reveals a crash loop before the disk fills.
Set warning and critical thresholds early enough to preserve restart and update operations. For a small system disk, a fixed 5–10GB operational reserve may be more meaningful than a percentage alone.
Use the table below to turn observed behavior into a limit.
| Observed state | Verdict | Next action |
|---|---|---|
| Routine service; low log rate | 30–100MB starting cap | Tune to troubleshooting window |
| Bursty service with justified history | Larger explicit exception | Monitor growth and forwarding |
| No rotation; falling free space | Unsafe | Enable limits before normal operation |
Apply rotation without losing essential evidence
Set daemon defaults and explicit exceptions for high-value services, then recreate or redeploy containers so the settings take effect. Confirm the active driver and options with container inspection.
Forward security or audit logs to a separate durable destination if they must outlive local rotation. Routine debug output should not be retained indefinitely on the system disk.
ZimaSpace’s Docker disk-growth workflow separates logs from layers and volumes.
RunBook Academy’s log-rotation analysis shows how `max-size` and `max-file` create a predictable ceiling.
Force a noisy-container validation
Generate controlled log output in a test container and watch files rotate. Confirm old files disappear at the configured count and the container continues running.
Restart Docker and the host, then repeat the check. Verify alerts fire before the operational reserve is consumed and that application logs outside the driver are separately bounded.
Proceed when worst-case aggregate logs fit inside the budget and rotation survives restart. Stop and fix the configuration if one container grows without bound, rotation is not active, or free space falls below the system reserve.
Support & Tips
More to Read

What Temperature Range Is Acceptable for an NVMe Drive in a Mini PC?
For many consumer NVMe drives, roughly 30–50°C idle and below 70°C sustained is a useful target, but the exact model limit controls.

How Much SSD Space Should a Media Server Reserve for Artwork and Cache?
Start with measured app-data usage plus 50–100% growth headroom; rich preview thumbnails can require far more SSD space than ordinary artwork.

How Many Simultaneous SMB Clients Can a 1GbE NAS Serve Comfortably?
A 1GbE NAS can serve many light clients, but only a few heavy transfers; the shared practical ceiling is roughly 100–115MB/s before other limits.

