arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~

每兆字节吞吐量:树莓派 5 上自托管 HTTP 服务语言栈效率的试点基准测试

Throughput per Megabyte: A Pilot Benchmark of Language-Stack Efficiency for Self-Hosted HTTP Services on a Raspberry Pi 5

William Oliveira

arXiv 2609.11932首次发表:更新:

AI 中文总结

在树莓派 5 上对比五种语言栈的 SQLite CRUD API,Rust 以最高吞吐量-RAM 比(310.25 req/s/MB)成为资源效率最优,.NET 高并发最强,Go 为生态实用选择。

AI 中文摘要

以云为中心的 Web 基准测试忽略了在 ARM64 单板计算机上自托管服务所面临的关键约束,尤其是空闲 RAM 占用和每请求能耗。我们在一个树莓派 5 上运行了试点基准测试,测量了使用 Go 1.26/net/http、Rust 1.95/Axum、Python 3.13/FastAPI+Granian、Node.js 24/Fastify 和 .NET 10 Native AOT 实现的等效 SQLite 支持的 CRUD API,每个栈和端点进行 N=50 次随机运行,并附带独立的并发扫描和内存时间序列采集。Rust 实现了最高的加权吞吐量与 RAM 之比(310.25 req/s/MB,是 Go 的 2.8 倍),因为其加权峰值 RSS 为 7.36 MB,而 .NET、Node.js、Go 和 Rust 形成了一个原始吞吐量集群,其 bootstrap 置信区间重叠(2,125–2,461 req/s),Python 则低于该集群,为 969 req/s。在 GET /items/:id 上的并发扫描显示出不同的扩展行为:.NET 在 c=240 时达到 26,209 req/s,Go 和 Rust 在 c=120 附近趋于平稳,Node.js 在约 9,700 req/s 时饱和,Python 保持在 2,300 req/s 以下;内存快照显示 Rust 保持平坦的 7.8 MB RSS,而 Node.js 增长了 117 MB 且没有可见的 GC 下降。对于该 Pi 5 设备上受 RAM 约束的自托管 CRUD-over-SQLite 部署,数据支持 Rust 作为资源效率最高的被测栈,.NET 作为最强的高并发栈,Go 作为生态广度重要时的实用选择;在将这些发现推广到其他设备或存储后端之前,需要进行复现实验。

英文摘要

Cloud-centric web benchmarks miss constraints that matter for self-hosted services on ARM64 single-board computers, especially idle RAM footprint and energy per request. We ran a pilot benchmark on one Raspberry Pi 5, measuring equivalent SQLite-backed CRUD APIs implemented in Go 1.26/net/http, Rust 1.95/Axum, Python 3.13/FastAPI+Granian, Node.js 24/Fastify, and .NET 10 Native AOT across N=50 randomized runs per stack and endpoint, with a separate concurrency sweep and memory time-series collection. Rust achieved the highest weighted throughput-to-RAM ratio (310.25 req/s/MB, 2.8x Go) because its weighted peak RSS was 7.36 MB, while .NET, Node.js, Go, and Rust formed a raw-throughput cluster with overlapping bootstrap CIs (2,125--2,461 req/s) and Python remained below that cluster at 969 req/s. The concurrency sweep on GET /items/:id showed divergent scaling: .NET reached 26,209 req/s at c=240, Go and Rust plateaued near c=120, Node.js saturated near 9,700 req/s, and Python stayed below 2,300 req/s; memory snapshots showed Rust holding a flat 7.8 MB RSS while Node.js grew by 117 MB without visible GC drops. For RAM-constrained self-hosted CRUD-over-SQLite deployments on this Pi 5 unit, the data support Rust as the most resource-efficient measured stack, .NET as the strongest high-concurrency stack, and Go as a practical option where ecosystem breadth matters; replication is needed before extending these findings to other devices or storage backends.

Comments34 pages, 11 figures, 22 tables. Replication package: https://github.com/woliveiras/2026-lang-self-hosted-pi

论文原文

arXiv 摘要页 · PDF 原文 · HTML 原文

↑