arXiv:2607.02630cs.DCcs.AI2026-07

用已有机制实现毫秒级计算卸载,无需重写代码即可提速5倍。

Fine-Grained Computation Offload for Off-the-Shelf Servers in Tens of Lines

  • 利用服务器自带的请求挂起恢复机制,实现卸载任务与其它请求重叠执行。
  • 在真实硬件上提升1.2-5.4倍性能,最极端情况下达17.3倍。
  • 仅需添加22-138行代码,适配各类生产级服务系统。

硬件加速器已成为在线服务的关键路径:GPU、FPGA及远程服务如硬件安全模块、后量子密钥封装机制和推理服务器日益普及。对于微秒至几毫秒级别的细粒度卸载,传统方法均失效——上下文切换耗时与卸载相当,忙等待则占用核心。解决之道是将卸载与其他请求并行执行。此前系统通过引入并发机制实现,如异步框架重构、新运行时或数据平面操作系统,或手工集成。本文观察到,现有服务器已具备并发能力:处理并发请求的本质就是挂起与恢复,因此重叠执行只需解决路由问题,而非重构。方法为:将卸载提交给执行器,用服务器自身延迟响应原语挂起请求,完成后恢复。在十类商用服务器上验证,该方案仅需22-138行代码,最多修改一个文件,实测性能提升1.2-5.4倍;服务器并发模型与卸载负载可预先预测性能增益。极限情况下,通过LD_PRELOAD注入纤程运行时,对无修改的线程-连接二进制程序实现17.3倍加速,且性能受限于设备吞吐与服务器重叠能力。重路由会破坏运行到完成原子性,但经实测,危害仅限未加锁共享聚合,透明页保护检测器可精准防护,已在标准Redis上验证。

原文摘要 · Abstract (English)

Hardware accelerators now sit on the critical path of online serving. GPUs, FPGAs, and increasingly remote services such as hardware security modules, post-quantum KEMs, and inference servers. For fine-grained offloads (microseconds to a few milliseconds) the classic responses to the resulting stall both fail: a context switch costs as much as the offload, and a busy-wait burns the core. Overlapping the offload with other requests is the fix, and prior systems obtain it by adding concurrency: an async-framework rewrite, a new runtime or dataplane OS, or a hand-tuned point integration. We observe that the concurrency already exists: serving concurrent requests is suspending and resuming them, so every server ships the machinery overlap needs. Overlap is then a routing problem, not a rewrite problem: submit the offload to an executor, suspend the request with the server's own deferred-response primitive, resume it on completion. Across ten off-the-shelf servers spanning every production concurrency model, this recipe takes 22-138 lines added, at most one modified, and recovers 1.2-5.4x on real hardware; the server's concurrency model and the offload's weight predict both numbers in advance, and the win is bounded by device throughput and the server's own overlap capacity. At the limit, an LD_PRELOAD fiber runtime injects the reroute into an unmodified thread-per-connection binary (17.3x) within a characterized envelope. Rerouting suspends run-to-completion atomicity; a measured taxonomy confines the hazard to unlocked shared aggregates, and a transparent page-protection detector guards exactly those, validated on stock Redis.

计算卸载性能优化服务器架构

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。