Skip to content
Calcrivo

Docker Log Growth Calculator

Project disk usage growth from container logs based on volume and retention settings.

Inputs

containers

Containers producing logs.

KB/min

Average log output rate per container.

days

How many days of logs are kept.

MB

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

  1. Daily logs per container

    10KB/min × 1440min / 1024

    = 14.1MB/day

  2. Retention period per container

    14.1MB × 7d

    = 98MB

  3. Capped by max-size

    min(98, 100)MB

    = 98MB

  4. 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