Overview
Four identical HTTP servers are placed under ramping load for 60 seconds while memory metrics are captured every second. Measures RSS, heap usage, GC pauses, and memory growth rate.
Methodology
- Load profile: Ramp from 10 to 500 concurrent connections over 60s
- Metrics: RSS via
/proc/[pid]/smaps, heap via runtime APIs - Runtimes: Node.js (Fastify), Python (FastAPI/uvicorn), Go (net/http), Rust (Actix)
Results
| Stack | RSS Start | RSS Peak | RSS Growth | GC Pauses | |---|---|---|---|---| | Rust | 6MB | 9MB | +3MB | None | | Go | 12MB | 34MB | +22MB | <1ms avg | | Node.js | 45MB | 128MB | +83MB | 10ms avg | | Python | 38MB | 156MB | +118MB | N/A |
Usage
docker-compose up
./bench.sh --duration 60 --ramp 10:500