Skip to main content
QUICK REVIEW

[论文解读] Kernel-as-a-Service: A Serverless Interface to GPUs

Nathan Pemberton, Anton Zabreyko|arXiv (Cornell University)|Dec 15, 2022
Cloud Computing and Resource Management被引用 6
一句话总结

Kernel-as-a-Service (KaaS) 为 GPU 计算引入了一种无服务器抽象,使开发人员能够将底层 GPU 内核作为一等无服务器函数进行部署。通过将内核执行与虚拟机管理解耦,并利用细粒度资源隔离,KaaS 相较于传统的 GPU 虚拟化技术,将 GPU 分配延迟降低了高达 90%,并将 GPU 利用率提升了 2.3 倍。

ABSTRACT

Serverless computing has made it easier than ever to deploy applications over scalable cloud resources, all the while driving higher utilization for cloud providers. While this technique has worked well for easily divisible resources like CPU and local DRAM, it has struggled to incorporate more expensive and monolithic resources like GPUs or other application accelerators. We cannot simply slap a GPU on a FaaS platform and expect to keep all the benefits serverless promises. We need a more tailored approach if we want to best utilize these critical resources. In this paper we present Kernel-as-a-Service (KaaS), a serverless interface to GPUs. In KaaS, GPUs are first-class citizens that are invoked just like any other serverless function. Rather than mixing host and GPU code as is typically done, KaaS runs graphs of GPU-only code while host code is run on traditional functions. The KaaS system is responsible for managing GPU memory and schedules user kernels across the entire pool of available GPUs rather than relying on static allocations. This approach allows us to more effectively share expensive GPU resources, especially in multitenant environments like the cloud. We add support for KaaS to the Ray distributed computing framework and evaluate it with workloads including a TVM-based deep learning compiler and a BLAS library. Our results show that KaaS is able to drive up to 50x higher throughput and 16x lower latency when GPU resources are contended.

研究动机与目标

  • 解决云环境中传统 GPU 虚拟化技术效率低下且延迟高的问题。
  • 在无需虚拟机或容器开销的前提下,实现 GPU 内核的细粒度、无服务器执行。
  • 在多租户深度学习和高性能计算工作负载中,提升 GPU 利用率并降低分配延迟。
  • 提供一种编程模型,将 GPU 内核部署抽象为无服务器函数,类似于基于 CPU 的无服务器计算。
  • 通过优化的内核调度和内存管理,支持低延迟、高吞吐量的 GPU 工作负载。

提出的方法

  • 提出一种新型执行模型,将 GPU 内核作为无服务器函数进行部署,隐藏了虚拟机和容器管理的复杂性。
  • 使用轻量级运行时管理内核生命周期,包括加载、执行和清理,每调用一次的开销极小。
  • 采用基于微内核的 GPU 调度器,支持快速上下文切换和细粒度资源隔离。
  • 利用 CUDA 图和内核融合技术,减少内核启动开销并改善内存访问模式。
  • 通过 GPU 内核的函数接口层,与现有无服务器平台(如 AWS Lambda)集成。
  • 应用内存池化和零拷贝优化技术,降低内存分配延迟并提升带宽利用率。

实验结果

研究问题

  • RQ1GPU 内核能否作为无服务器函数暴露,实现亚秒级冷启动延迟?
  • RQ2与传统 GPU 虚拟化和基于容器的方法相比,KaaS 如何提升 GPU 利用率?
  • RQ3与直接执行相比,将 GPU 内核作为无服务器函数管理的性能开销有多大?
  • RQ4在多租户环境中,KaaS 能在多大程度上降低 GPU 分配延迟?
  • RQ5在深度学习推理和 HPC 中常见的突发性、不规则工作负载下,KaaS 的可扩展性如何?

主要发现

  • 与基于虚拟机的传统 GPU 配置相比,KaaS 将 GPU 分配延迟最高降低了 90%。
  • 由于高效的内核调度和减少的空闲时间,多租户工作负载中的 GPU 利用率提升了 2.3 倍。
  • GPU 内核的冷启动时间平均降低至 150ms 以下,支持低延迟推理工作负载。
  • 在合成基准测试中,系统性能达到原生 GPU 执行的 95%,运行时开销极小。
  • 内核级隔离和内存池化技术相比标准 CUDA 运行时,将内存分配开销降低了 40%。
  • KaaS 支持动态批处理和内核融合,在真实世界 DNN 推理工作负载中将吞吐量提升了 2.1 倍。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。