-
Notifications
You must be signed in to change notification settings - Fork 7
Raspberry Pi 3 Benchmark Instructions
- Raspberry Pi 3 Model B v2016
- Specs -
- Quad Core 1.2 GHz 64-bit Cortex A53
- 1GB RAM
- 100 Mbps Ethernet
- Operating system
- Kernel - 5.10.52-v7+
- Arm Arch - armv7l
- Raspberry PI OS
- Runtime versions
- Apache Benchmark (AB tool) for the stress test
ab -k -c 350 -n 5000 http://<rpi ip>:3000/
# 350 concurrent requests and 5000 total requests
Sync
Async
Sync
Async
5k requests
500k requests
CPU util in 500k requests test
Clearly Fiber (Golang) is way ahead of the game interms of speed and raw performance. Express (NodeJS) is ~2x faster than Python (FastAPI) and the these frameworks are ~7.5 and ~11 times respectively slower than Fiber.
However, this doesn't mean that you no longer use Python or NodeJS based frameworks. Your current software stack along with the dev skills you have in your team will play an important role in making these decisions.
We use Python and Node based RESTful APIs extensively, absolute performance becomes relavent when you are doing things at scale. These benchmarks are solely in terms of raw speed / throughput and do not consider things like developement speed example - existing eco-system and available resources.
General recommendation is that you choose Python based RESTful framework when you are say working with AI/ML based services or your team knows Python well. And same goes for NodeJS based framework decisions, there is no silver bullet here!
Hope this gave you some perspective. Feel free to share comments and feedback.
Author - Nikhil Akki
Blog article Link