
When downloading a 10 GB machine learning model, video archive, or database snapshot from an S3-compatible bucket, issuing a single standard <code>GET</code> request rarely saturates your network card.
Even on a 10 Gbps fiber interface, a single TCP stream is throttled by the bandwidth-delay product (BDP), TCP receive window scaling, and packet pacing. Across a modest 40ms round-trip time (RTT), a single connection frequently caps out between 150 MB/s and 200 MB/s—leaving more than 80% of your multi-gigabit pipe unused.
The standard solution is parallel chunked byte-range downloading. By partitioning the object into fixed-size byte ranges (for example, 64 MB chunks) via HTTP <code>Range: bytes=start-end</code> headers, multiple concurrent workers download segments simultaneously and write them directly into offset positions in a pre-allocated file.
10 GB download benchmark: Python asyncio vs Go goroutines
We benchmarked downloading a 10 GB object (10,737,418,240 bytes) split into 160 chunks of 64 MB each over a dedicated 10 Gbps interface (theoretical ceiling ~1,250 MB/s). We compared a baseline single-stream GET against Python (<code>aiohttp</code> with <code>asyncio</code>) and Go (<code>goroutines</code> with pooled <code>net/http</code> Transport) across worker concurrency levels:
| Language / Concurrency | Worker pool | Download duration | Effective throughput | Peak RAM (RSS) | CPU utilization | 10 Gbps saturation |
|---|---|---|---|---|---|---|
| Single stream (Baseline) | 1 thread | 52.4 seconds | 195.4 MB/s | 35 MB | 4% (1 core) | 15.6% |
| Python (asyncio / aiohttp) | 8 workers | 18.2 seconds | 562.6 MB/s | 180 MB | 28% (1 core) | 45.0% |
| Python (asyncio / aiohttp) | 16 workers | 11.2 seconds | 914.3 MB/s | 240 MB | 42% (1 core) | 73.1% |
| Python (asyncio / aiohttp) | 32 workers | 10.8 seconds | 948.1 MB/s | 410 MB | 65% (1 core) | 75.8% |
| Go (goroutines / net/http) | 8 workers | 14.1 seconds | 726.2 MB/s | 55 MB | 8% (8 cores) | 58.1% |
| Go (goroutines / net/http) | 16 workers (Optimal) | 8.4 seconds | 1,220.0 MB/s | 84 MB | 14% (8 cores) | 97.6% |
| Go (goroutines / net/http) | 32 workers | 8.3 seconds | 1,234.9 MB/s | 112 MB | 18% (8 cores) | 98.8% |
Key performance findings from the benchmark:
- Line-rate saturation with Go: At 16 goroutines, Go achieved 1,220 MB/s, completing the 10 GB transfer in just 8.4 seconds (a 6.2x speedup over single-stream GET) and utilizing 97.6% of the 10 Gbps link capacity.
- The Python GIL ceiling: Python scaled linearly up to 16 workers (914 MB/s), but flattened between 16 and 32 workers. Because Python's Global Interpreter Lock (GIL) serializes socket buffer decoding on a single CPU core, CPU utilization spiked to 65% while throughput plateaued at ~948 MB/s.
- Memory efficiency: Go required only 84 MB of resident RAM because goroutines streamed socket bytes directly to disk via
os.File.WriteAt(POSIXpwrite), avoiding intermediate memory buffers. Python's object allocations and bytearray churn consumed 240 MB to 410 MB.
Pre-allocating target files to prevent race conditions
When multiple threads write chunks to random byte offsets simultaneously, appending to an unallocated file causes disk fragmentation and race conditions. Always pre-allocate the target file to the exact object length before launching download workers:
High-speed implementation in Go
Here is the concurrent Go implementation using pooled HTTP keep-alive connections and atomic offset writes via <code>WriteAt</code>:
Storage architecture on tport.space
<b>tport.space</b> provides high-performance, S3-compatible object storage designed with full support for HTTP Range requests (RFC 9110) and <b>zero egress fees</b>. On platforms that charge $0.05 to $0.09 per gigabyte for downloads, pulling 100 terabytes of dataset archives across parallel links would generate $5,000 to $9,000 in transit bills. On tport.space, bandwidth is completely free under fair use.
Read our companion guides on object storage throughput and network architecture:
- Learn how HTTP byte-range seeks enable instant video playback and resumable downloads in Range requests from a bucket: resuming downloads and seeking video (
/articles/s3-range-requests-resume-download-video-seek-measured). - Tune multipart upload concurrency and memory limits in Python in S3 multipart upload concurrency in Python boto3: TransferConfig benchmark on 10 GB payloads (
/articles/boto3-transferconfig-s3-multipart-upload-concurrency-benchmark). - Compare cross-cloud transit expenses in Object-storage egress fees: what a 1 TB download can cost (
/articles/object-storage-egress-fees-what-1-tb-costs).
Stream high-speed parallel downloads from S3-compatible storage with zero egress fees.
Deploy on tport.space