Capacity & Traffic Calculators

Three calculators for sizing disk space and transfer when running an image server.

Image Storage Size

Estimate required disk space from original files and backup copies.

Thumbnail Cache

Estimate extra storage needed for separately saved thumbnails.

Monthly Traffic

Estimate origin-server transfer from views, MB per view, and CDN cache hit rate.

How to Read the Results

The default values provide a concrete example of how to interpret each result. Display units are binary, where 1 KB equals 1024 bytes.

Originals and thumbnails

Example
10,000 × 2.8MB × 2 copies 10,000 × 70KB × 1 copy
Result
Required storage 54.69GB Thumbnail cache 683.59MB

A copy count of two means two total stored copies including the primary. Use three for a primary plus two backups.

Origin traffic behind a CDN

Example
50,000 views × 1.2MB × (1 - 60% cache hit)
Result
Monthly origin transfer 23.44GB

Replace the cache-hit input regularly with the measured value from your CDN dashboard.

Related articles

Checking the Math in a Script

The calculator uses plain multiplication. Plug in real folder numbers to verify it yourself.

# 0) install bc (a calculator) if missing
sudo apt install -y bc

# 1) save this as capacity.sh and run it (bash capacity.sh)
#!/usr/bin/env bash
count=$(find ~/uploads -type f | wc -l)   # auto-count files
avg=2.6            # average file size (MB) — from du -sh
variants=3         # number of thumbnail sizes (e.g. S/M/L)

# originals = count × average
original=$(echo "$count * $avg" | bc)
# thumbnails = count × variants × (about 20% of average)
thumbs=$(echo "$count * $variants * $avg * 0.2" | bc)

echo "originals ${original}MB + thumbs ${thumbs}MB"
#    → e.g. "originals 12532MB + thumbs 7519MB"
#    budget 1.5–2× of the total to include backups