Docker Log Growth Calculator
Project disk usage growth from container logs based on volume and retention settings.
Inputs
Containers producing logs.
Average log output rate per container.
How many days of logs are kept.
Docker --log-opt max-size setting per container.
Total Log Disk Usage
2.40GB
Per-Container Daily Logs
14.1MB/day
Effective per Container (capped)
98MB
Uncapped Total (no max-size)
2.40GB
Step by step
Daily logs per container
10KB/min × 1440min / 1024
= 14.1MB/day
Retention period per container
14.1MB × 7d
= 98MB
Capped by max-size
min(98, 100)MB
= 98MB
Total disk across all containers
25 × 98MB
= 2.40GB
How it works
Container log growth = containers × min(logRate × 1440 × retentionDays / 1024, maxFileSize). Docker's --log-opt max-size caps per-container log files, causing rotation. Without caps, verbose containers can consume disk rapidly.
Formula
Log Disk
disk = containers × min(logRate × minutesPerDay × retention / 1024, maxSize)
- containers
- Number of logging containers
- logRate
- KB/min log output
- retention
- Days of retention
- maxSize
- Docker max-size cap in MB
Frequently Asked Questions
What's the default log driver behavior without max-size?
Without --log-opt max-size, the json-file driver grows logs indefinitely until disk is full, which is a common cause of production outages on long-running containers.
How many rotated files does Docker keep?
Set via --log-opt max-file (default 1). Setting max-file=3 with max-size=100m keeps up to 300MB per container.
You might also need
- Docker Registry Storage CalculatorCommonly used together
- Docker Restart Policy EstimatorCommonly used together
- Docker Volume Size CalculatorCommonly used together
- Docker Container Density CalculatorCommonly used together
- Docker Image Size CalculatorAlso in Docker
- Docker Container Memory CalculatorAlso in Docker