Wasm-R3:面向真实且独立运行的WebAssembly基准测试的记录-缩减-重放技术
Wasm-R3: Record-Reduce-Replay for Realistic and Standalone WebAssembly Benchmarks
AI总结:
Wasm-R3提出首个Wasm记录-缩减-重放技术,通过注入插桩记录真实Web应用执行轨迹并经优化缩减后生成可在任意引擎独立运行的重放模块,解决了Wasm基准测试缺乏代表性的问题。
摘要:
WebAssembly(简称Wasm)为Web以及边缘计算、物联网和嵌入式系统带来了新的强大能力。Wasm是一种可移植、紧凑的二进制代码格式,具有高性能和强大的沙箱隔离特性。随着Wasm应用规模和重要性的不断增长,多样化的Wasm引擎所具有的复杂性能特征要求使用健壮且具有代表性的基准测试来进行适当的调优。文献中仍在使用诸如PolyBenchC和libsodium之类的临时替代基准测试套件,尽管已知它们不具代表性。移植更复杂的套件仍然困难,因为Wasm缺少许多系统API,而且由于复杂的主机交互,从Web中提取真实世界的Wasm基准测试也很困难。为了应对这一挑战,我们提出了Wasm-R3,这是首个针对Wasm的记录与重放技术。Wasm-R3透明地将插桩注入Wasm模块中,以从模块内部记录执行轨迹,然后通过若干优化来缩减执行轨迹,最后生成一个无需任何主机环境即可在任何引擎上独立运行的重放模块。我们的方法所创建的基准测试具有以下特点:(i)真实性,因为该方法记录了真实世界的Web应用;(ii)忠实于原始执行,因为重放基准测试包含未经修改的原始代码,仅添加了对主机交互的模拟;(iii)独立性,因为重放基准测试可在任何引擎上运行。将Wasm-R3应用于现实中的基于Web的Wasm应用,证明了我们方法的正确性以及优化的有效性,这些优化将记录的轨迹缩减了99.53%,并将重放基准测试的大小缩减了9.98%。我们向社区发布了由此产生的包含27个应用的基准测试套件,称为Wasm-R3-Bench,以激发新一代真实且独立运行的Wasm基准测试。
英文摘要:
WebAssembly (Wasm for short) brings a new, powerful capability to the web as well as Edge, IoT, and embedded systems. Wasm is a portable, compact binary code format with high performance and robust sandboxing properties. As Wasm applications grow in size and importance, the complex performance characteristics of diverse Wasm engines demand robust, representative benchmarks for proper tuning. Stopgap benchmark suites, such as PolyBenchC and libsodium, continue to be used in the literature, though they are known to be unrepresentative. Porting of more complex suites remains difficult because Wasm lacks many system APIs and extracting real-world Wasm benchmarks from the web is difficult due to complex host interactions. To address this challenge, we introduce Wasm-R3, the first record and replay technique for Wasm. Wasm-R3 transparently injects instrumentation into Wasm modules to record an execution trace from inside the module, then reduces the execution trace via several optimizations, and finally produces a replay module that is executable sandalone without any host environment - on any engine. The benchmarks created by our approach are (i) realistic, because the approach records real-world web applications, (ii) faithful to the original execution, because the replay benchmark includes the unmodified original code, only adding emulation of host interactions, and (iii) standalone, because the replay benchmarks run on any engine. Applying Wasm-R3 to web-based Wasm applications in the wild demonstrates the correctness of our approach as well as the effectiveness of our optimizations, which reduce the recorded traces by 99.53 percent and the size of the replay benchmark by 9.98 percent. We release the resulting benchmark suite of 27 applications, called Wasm-R3-Bench, to the community, to inspire a new generation of realistic and standalone Wasm benchmarks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。