We propose novel techniques that exploit data and computation sharing to improve the performance of complex stateful parallel computations, like agent-based simulations. Parallel computations are translated into behavioral equations, a novel formalism layered on top of the foundational process calculus $\pi$-calculus. Behavioral equations blend code and data, allowing a system to easily compose and transform parallel programs into specialized programs. We show how optimizations like merging programs, synthesizing efficient message data structures, eliminating local messaging, rewriting communication instructions into local computations, and {aggregation pushdown} can be expressed as transformations of behavioral equations. We have also built a system called OptiFusion that implements behavioral equations and the aforementioned optimizations. Our experiments showed that OptiFusion is over 10$\times$ faster than state-of-the-art stateful systems benchmarked via complex stateful workloads. Generating specialized instructions that are impractical to write by hand allows OptiFusion to outperform even the hand-optimized implementations by up to 2$\times$.
翻译:我们提出了一种新颖的技术,通过利用数据与计算共享来提升复杂有状态并行计算(如基于智能体的模拟)的性能。并行计算被转换为行为方程——一种建立在基础进程演算 $\pi$-演算之上的新型形式化方法。行为方程融合了代码与数据,使得系统能够轻松地将并行程序组合并转换为专用程序。我们展示了如何将程序合并、合成高效的消息数据结构、消除本地消息传递、将通信指令重写为本地计算以及{聚合下推}等优化表达为行为方程的变换。我们还构建了一个名为 OptiFusion 的系统,该系统实现了行为方程及上述优化。实验表明,在通过复杂有状态工作负载进行基准测试时,OptiFusion 的性能比现有先进的有状态系统快 10$\times$ 以上。通过生成手工编写不切实际的专用指令,OptiFusion 甚至能比手工优化的实现快达 2$\times$。