Despite decades of research, developing correct and scalable concurrent programs is still challenging. Network functions (NFs) are not an exception. This paper presents NFork, a system that helps NF domain experts to productively develop concurrent NFs by abstracting away concurrency from developers. The key scheme behind NFork's design is to exploit NF characteristics to overcome the limitations of prior work on concurrency programming. Developers write NFs as sequential programs, and during runtime, NFork performs transparent parallelization by processing packets in different cores. Exploiting NF characteristics, NFork leverages transactional memory and develops efficient concurrent data structures to achieve scalability and guarantee the absence of concurrency bugs. Since NFork manages concurrency, it further provides (i) a profiler that reveals the root causes of scalability bottlenecks inherent to the NF's semantics and (ii) actionable recipes for developers to mitigate these root causes by relaxing the NF's semantics. We show that NFs developed with NFork achieve competitive scalability with those in Cisco VPP [16], and NFork's profiler and recipes can effectively aid developers in optimizing NF scalability.
翻译:尽管经过数十年的研究,开发正确且可扩展的并发程序仍具挑战性,网络功能(NF)也不例外。本文提出NFork系统,通过将并发性从开发者中抽象出来,帮助NF领域专家高效开发并发网络功能。NFork设计的核心策略是利用NF特性克服先前并发编程工作的局限性。开发者将NF编写为顺序程序,运行时NFork通过在不同核心上处理数据包实现透明的并行化。借助NF特性,NFork利用事务内存并开发高效并发数据结构以实现可扩展性,同时确保无并发错误。由于NFork管理并发性,它进一步提供了:(i)揭示NF语义固有可扩展性瓶颈根本原因的性能分析器,以及(ii)为开发者提供通过放松NF语义来缓解这些根本原因的可行方案。实验证明,使用NFork开发的网络功能在可扩展性上与Cisco VPP[16]中的方案具有竞争力,且NFork的分析器与方案能有效帮助开发者优化NF可扩展性。