Skip to content
Back to Blog
2026-11-30Testing

Test File Download Sizes: 1 MB vs 10 MB vs 100 MB, and What Each One Tests

Downloads fail differently from uploads: the client sets the pace, the server decides the headers, and the bugs hide in progress bars, resume logic, and timeout budgets. A fixed-size test file turns all of that into arithmetic — but only if the size is deliberate. A 1 MB file finishes before anything interesting happens; a 100 MB file punishes every CI run for half a minute. Here is how to choose between a 1 MB, 10 MB, and 100 MB test file download, and what each size actually verifies.

Match the Size to the Failure Mode

SizeExact bytesTransfer time @ 25 MbpsWhat it actually tests
1 MB1,048,576~0.3 sEndpoint sanity in CI, mobile and high-latency paths, suites that iterate hundreds of times
10 MB10,485,760~3.4 sThroughput measurement, progress bars and ETA math, CDN and proxy behavior, typical document download
100 MB104,857,600~34 sSustained throughput, resumable downloads, timeout budgets, disk write speed, partial-file cleanup

The 10 MB file is the workhorse. It is large enough that TLS handshakes and connection setup stop dominating the measurement, yet small enough to finish in seconds even on a slow link — which keeps it usable in CI. The 1 MB file exists for iteration speed: a suite that downloads 200 fixtures per run stays fast only if each one is cheap. The 100 MB file is where the interesting failures live, because any transfer longer than a few seconds eventually gets interrupted by a tunnel, an elevator, or a sleeping laptop — so resume logic and timeout behavior only get exercised at that scale.

Do the Math Before You Set Timeouts

A download budget is one formula: seconds = bytes × 8 ÷ bits-per-second. Two unit traps make real-world numbers drift:

  • MiB vs MB. 10 MB (decimal) is 10,000,000 bytes; 10 MiB is 10,485,760 — a 4.9% difference. If the fixture is measured in MiB but the timeout was budgeted in MB, slow-but-healthy clients get killed at the finish line. Know which one your file is.
  • Cold-start overhead. DNS, TCP, and TLS can add seconds before the first byte on a high-latency mobile connection. The formula covers transfer only.

Expected transfer times, using the exact MiB sizes above:

Link speed1 MiB10 MiB100 MiB
4 Mbps2.1 s21 s3.5 min
10 Mbps0.8 s8.4 s84 s
25 Mbps0.3 s3.4 s34 s
100 Mbps0.1 s0.8 s8.4 s

Set client timeouts at roughly 3× the worst-case row you intend to support. If the floor is a 10 Mbps mobile link, a 10 MiB file needs 8.4 s when healthy — a 10 s timeout tolerates only perfection, while 25–30 s tolerates reality.

Random Data, or Your Numbers Lie

Throughput is only honest if the payload cannot be compressed in transit. A 10 MB file of zeros behind a gzip-enabled proxy transfers as a few dozen kilobytes — the download finishes in a blink and reports fantasy bandwidth. That is why the 10 MB binary test file contains random data: incompressible bytes, so what leaves the server is what hits the wire.

An MP4 sample is the other honest payload — video is already compressed, and it doubles as a realistic average web download. Avoid text fixtures for speed measurement: a sample TXT or JSON file shrinks dramatically (often 70%+) under Content-Encoding: gzip, and every layer that compresses quietly inflates the speed you think you measured.

Testing Resumable Downloads

HTTP gives you Range requests for interrupted transfers, and they are trivial to exercise:

# Fetch only the first KiB — expect 206, not 200
curl -s -D - -o chunk.bin \
  -H "Range: bytes=0-1023" \
  https://www.samplefiles.online/files/sample-10mb.bin
# HTTP/1.1 206 Partial Content
# Content-Range: bytes 0-1023/10485760

# Resume an interrupted transfer from the byte offset on disk
curl -C - -o sample-10mb.bin \
  https://www.samplefiles.online/files/sample-10mb.bin
wget -c https://www.samplefiles.online/files/sample-10mb.bin

What to assert around resumability:

CheckExpected
Partial request status206 with a Content-Range header, not a silent full 200 re-send
HEAD responseAccept-Ranges: bytes
Reassembly after resumewc -c reports exactly 10,485,760
Range starting past EOF416, never a 500 or an empty 200

The last row is the one that breaks in production: a client that computes a stale offset after a server-side file change requests an impossible range, and plenty of implementations turn that into an unhandled exception instead of a clean 416.

Progress Bars and the Two Header Traps

Progress UI math is received-bytes ÷ Content-Length. Both halves can betray you:

  1. Chunked transfer. The server streams without a Content-Length, so there is no total and the bar goes indeterminate. If your design requires determinate progress, assert the header exists: curl -sI <url> must report Content-Length: 10485760 for the 10 MB fixture.
  2. On-the-fly gzip. With Content-Encoding: gzip, Content-Length describes the compressed bytes while the client counts decoded bytes — the bar blows past 100% and the ETA goes negative. Test twice, once with Accept-Encoding: identity and once with gzip, and make sure both paths behave.

For the throughput readout itself, curl does the bookkeeping: curl -o /dev/null -w '%{speed_download} bytes/s\n' <url> prints the average bytes per second — a one-line CI assertion that fails the moment a regression halves download speed.

Verify What Actually Landed

A "successful" download that wrote 10,483,200 bytes is a corrupt file with a success code. Make verification mechanical:

curl -sO https://www.samplefiles.online/files/sample-10mb.bin
wc -c sample-10mb.bin
# 10485760
sha256sum sample-10mb.bin
# bd530201aad59d0aae1a7b28aa7d74daaf052340cac09473c9e3d1c128e59199

The byte count catches truncation; the hash catches silent corruption. At 100 MB scale the same checks catch the classic disk-full-at-98% failure, where the client reports success and the file is simply short. For format files, a magic-number check is a cheap second net: a sample PDF that survived a download should still begin with %PDF-.

Download features usually get tested with whatever file is lying around, which is why they ship with progress bars that lie and timeouts that punish slow customers. One fixed-size file chosen for the failure mode you care about turns all of that into arithmetic: 1 MB for iteration, 10 MB for measurement, 100 MB for the interruptions. Grab the size that matches your bug, wire the assertions above into CI, and the next regression announces itself instead of shipping.

#download#test-files#file-size#curl#performance