With their high parallelism and resource needs, many scientific applications benefit from cloud deployments. Today, scientific applications are executed on dedicated pools of VMs, resulting in resource fragmentation: users pay for underutilised resources, and providers cannot reallocate unused resources between applications. While serverless cloud computing could address these issues, its programming model is incompatible with the use of shared memory and message passing in scientific applications: serverless functions do not share memory directly on the same VM or support message passing semantics when scheduling functions dynamically. We describe Faabric, a new serverless cloud runtime that transparently distributes applications with shared memory and message passing across VMs. Faabric achieves this by scheduling computation in a fine-grained (thread/process) fashion through a new execution abstraction called Granules. To support shared memory, Granules are isolated using WebAssembly but share memory directly; to support message passing, Granules offer asynchronous point-to-point communication. Faabric schedules Granules to meet an application's parallelism needs. It also synchronises changes to Granule's shared memory, and migrates Granules to improve locality.
翻译:由于科学应用具有高度并行性和资源需求,许多此类应用受益于云部署。当前,科学应用运行在专用虚拟机池上,导致资源碎片化问题:用户为未充分利用的资源付费,而提供方无法在应用之间重新分配闲置资源。尽管无服务器云计算可能解决这些问题,但其编程模型与科学应用中共享内存和消息传递的使用方式不兼容:无服务器函数无法在同一虚拟机内直接共享内存,也无法在动态调度函数时支持消息传递语义。本文提出Faabric——一种新型无服务器云运行时,能够透明地将支持共享内存和消息传递的应用分布到多台虚拟机上。Faabric通过名为Granules的新型执行抽象,以细粒度(线程/进程)方式调度计算任务。为支持共享内存,Granules使用WebAssembly进行隔离但可直接共享内存;为支持消息传递,Granules提供异步点对点通信。Faabric通过调度Granules满足应用的并行需求,同步Granules共享内存的变更,并通过迁移Granules优化数据局部性。