通过差分测试揭示服务器端 WebAssembly 运行时的性能问题
Revealing Performance Issues in Server-side WebAssembly Runtimes via Differential Testing
AI总结:
本文提出差分测试方法 WarpDiff,通过比较同一测试用例在不同 Wasm 运行时上的执行时间比值与预期比值的偏差来定位服务器端 Wasm 运行时的性能问题,并在五个流行运行时上识别并确认了七个性能问题。
摘要:
WebAssembly(Wasm)是一种字节码格式,最初用作 Web 应用的编译目标。近年来,它越来越多地被用于服务器端,例如作为 Linux 容器的一种更安全、更快速、更可移植的替代方案。随着服务器端 Wasm 应用的普及,研究 Wasm 运行时中的性能问题(即异常延迟)至关重要,因为它们可能对服务器端应用产生显著影响。然而,目前对服务器端 Wasm 运行时中的性能问题仍缺乏关注。在本文中,我们设计了一种新颖的差分测试方法 WarpDiff,用于识别服务器端 Wasm 运行时中的性能问题。其关键洞察在于:在正常情况下,同一个测试用例在不同 Wasm 运行时上的执行时间应当遵循一个预期比值(oracle ratio)。我们识别出执行时间比值显著偏离预期比值的异常情况,并随后定位导致性能问题的 Wasm 运行时。我们将 WarpDiff 应用于测试五个流行的服务器端 Wasm 运行时,使用来自 LLVM 测试套件的 123 个测试用例,并展示了我们识别出的前 10 个异常情况。我们进一步对这些异常情况进行了深入分析,总结出七个性能问题,所有问题均已得到开发者的确认。我们希望我们的工作能够启发未来对改进 Wasm 运行时实现的研究,从而促进服务器端 Wasm 应用的发展。
英文摘要:
WebAssembly (Wasm) is a bytecode format originally serving as a compilation target for Web applications. It has recently been used increasingly on the server side, e.g., providing a safer, faster, and more portable alternative to Linux containers. With the popularity of server-side Wasm applications, it is essential to study performance issues (i.e., abnormal latency) in Wasm runtimes, as they may cause a significant impact on server-side applications. However, there is still a lack of attention to performance issues in server-side Wasm runtimes. In this paper, we design a novel differential testing approach WarpDiff to identify performance issues in server-side Wasm runtimes. The key insight is that in normal cases, the execution time of the same test case on different Wasm runtimes should follow an oracle ratio. We identify abnormal cases where the execution time ratio significantly deviates from the oracle ratio and subsequently locate the Wasm runtimes that cause the performance issues. We apply WarpDiff to test five popular server-side Wasm runtimes using 123 test cases from the LLVM test suite and demonstrate the top 10 abnormal cases we identified. We further conduct an in-depth analysis of these abnormal cases and summarize seven performance issues, all of which have been confirmed by the developers. We hope our work can inspire future investigation on improving Wasm runtime implementation and thus promoting the development of server-side Wasm applications.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。