Real-world performance benchmarking of Python web applications across different Python versions.
This project benchmarks Wagtail CMS (a popular Django-based CMS) across multiple Python versions to provide actionable insights for version migration decisions.
Supported Python Versions:
- Python 3.10, 3.11, 3.12, 3.13, 3.14
- Python 3.13t (free-threaded/nogil)
- Python 3.14t (free-threaded/nogil)
- Python 3.14-tailcall (experimental tailcall optimization)
Python 3.11 shows ~18% average performance improvement over Python 3.10!
See BENCHMARK_SUMMARY.md for detailed results.
- Python 3.11: Best overall performance (+18% vs 3.10)
- Python 3.12: Competitive with 3.11
- Memory Usage: Similar across all versions (~270-287 MB)
- Success Rate: 100% across all tests
- Docker installed
- Python 3.x
- Apache Bench (ab)
# Build Docker images for all Python versions
make build
# Run the benchmark suite
make run
# Generate summary report
python3 scripts/generate_summary.pypython-web-benchmarks/
├── apps/
│ └── wagtail/ # Wagtail CMS configuration
│ ├── Dockerfile
│ ├── setup_realworld_data.py # Real-world data generator
│ └── entrypoint.sh
├── benchmarks/
│ ├── runner.py # Main orchestration
│ ├── metrics_collector.py # Resource monitoring
│ └── load_generator.py # HTTP load testing
├── config/
│ └── config.yaml # Benchmark configuration
├── data/
│ ├── raw/ # JSON results
│ └── BENCHMARK_SUMMARY.md # Summary report
├── scripts/
│ └── generate_summary.py # Report generator
└── Makefile # Build and run commands
The benchmark includes real-world test scenarios:
- Homepage Load - Full page with navigation, sections, and content
- Admin Login - Authentication and admin interface
- Page Browsing - Blog pages with 15+ articles
Each scenario is tested with:
- 1, 5, 10, and 20 concurrent users
- Multiple requests per user
- Full resource monitoring
The Wagtail instance includes:
- ✅ 15+ blog posts with realistic content
- ✅ Multiple pages (About, Services, Contact, etc.)
- ✅ Fully configured admin interface
- ✅ Real database with migrations
- ✅ Static file serving
Edit config/config.yaml to:
- Add/remove Python versions
- Modify test scenarios
- Adjust concurrent user levels
- Change test duration
Results are saved as JSON in data/raw/ with metrics including:
- Requests per second (RPS)
- Response times
- Error rates
- CPU usage
- Memory consumption
make help # Show available commands
make install # Install Python dependencies
make build # Build Docker images
make run # Run benchmark suite
make clean # Clean up containers and imagesBased on the latest benchmark run:
- Performance: Python 3.11 provides the best overall performance
- Stability: 100% success rate across all Python versions
- Resources: Memory usage is consistent across versions
- Recommendation: Upgrade to Python 3.11 or 3.12 for production workloads
MIT
Contributions welcome! Areas for improvement:
- Add more web applications (Airflow, Sentry, etc.)
- Add visualization dashboards
- Implement CI/CD pipelines
- Test additional Python experimental features