计算机科学 ›› 2025, Vol. 52 ›› Issue (9): 170-177.doi: 10.11896/jsjkx.250300031

• 高性能计算 • 上一篇    下一篇

基于最长时延加权带宽的Wasm与容器混合函数部署优化方法

谌燃照1, 李哲雄1, 顾琳3, 钟梁4, 曾德泽1,2   

  1. 1 中国地质大学(武汉)计算机学院 武汉 430078
    2 中国地质大学(武汉)未来技术学院 武汉 430078
    3 华中科技大学计算机科学与技术学院 武汉 430074
    4 中国地质大学(武汉)机械与电子信息学院 武汉 430078
  • 收稿日期:2025-03-06 修回日期:2025-05-02 出版日期:2025-09-15 发布日期:2025-09-11
  • 通讯作者: 曾德泽(deze@cug.edu.cn)
  • 作者简介:(ranz7774@gmail.com)
  • 基金资助:
    国家自然科学基金(62432015,62172375,62372200);湖北省重点研发计划(2023BAB065);中国地质大学(武汉)“地大学者”科研基金(2022179)

Joint Function Deployment Optimization Method for WebAssembly and Containers Based on Longest Latency-Weighted Bandwidth

CHEN Ranzhao1, LI Zhexiong1, GU Lin3, ZHONG Liang4, ZENG Deze1,2   

  1. 1 School of Computer Science,China University of Geosciences(Wuhan),Wuhan 430078,China
    2 School of Future Technology,China University of Geosciences(Wuhan),Wuhan 430078,China
    3 School of Computer Science and Technology,Huazhong University of Science and Technology,Wuhan 430074,China
    4 School of Mechanical and Electronic Information,China University of Geosciences(Wuhan),Wuhan 430078,China
  • Received:2025-03-06 Revised:2025-05-02 Online:2025-09-15 Published:2025-09-11
  • About author:CHEN Ranzhao,born in 2000,postgra-duate.His main research interests include edge computing and serverless computing.
    ZENG Deze,born in 1984,professor.His main research interests include edge computing and future network technology.
  • Supported by:
    National Natural Science Foundation of China(62432015,62172375,62372200),Key R&D Program of Hubei Province(2023BAB065) and “Scholars of China University of Geosciences(Wuhan)” Scientific Research Fund(2022179).

摘要: 容器技术因具备轻量化、易于部署和高可用等优势,在边缘服务器无感知计算平台中得到了广泛使用。然而,随着应用对低延迟需求的增长,容器的冷启动所引发的高时延问题逐渐成为系统性能的瓶颈。WebAssembly(Wasm)凭借其轻量级沙箱特性和毫秒级启动能力,成为容器技术在某些场景下的重要补充方案。然而,Wasm的计算性能相较容器存在劣势,尤其在需要处理函数间的复杂依赖关系时,Wasm和容器的固有优缺点使得函数部署方式和部署位置的决策变得十分困难。为解决该问题,构建了基于函数依赖关系的服务器无感知计算模型,将Wasm与容器混合部署问题转换为非线性整数规划问题。该问题随后被证明是一个NP-hard问题。为此,设计了长时延敏感的加权带宽贪心调度算法(Long-Latency-Sensitive Weighted Bandwidth Greedy Scheduling Algorithm,LLS-WBG),根据函数依赖以及前驱函数最长完成时间,加权计算服务器带宽,以优化资源利用并降低任务尾时延。基于真实世界数据的实验结果表明,在边缘计算场景下,与先进算法相比,所提出的算法能够使应用完成时间减少44.45%。

关键词: 服务器无感知计算, 容器, 边缘计算, WebAssembly

Abstract: Container technology has been widely used in the oblivious computing platform of edge servers due to its advantages such as lightweight nature,easy deployment,and high availability.However,with the increasing demand for low-latency in applications,the high-latency problem caused by the cold start of containers has gradually become a bottleneck for system perfor-mance.WebAssembly(Wasm),with its lightweight sandbox feature and millisecond-level startup capability,has become an important complementary solution to container technology in certain scenarios.However,its computational performance is inferior to that of containers.Especially when dealing with complex interdependencies between functions,the inherent advantages and disadvantages of Wasm and containers make the decision on function deployment methods and locations extremely difficult.To address this issue,this paper constructs an oblivious computing model for servers based on function dependencies,transforming the pro-blem of mixed deployment of Wasm and containers into a non-linear integer programming problem.This problem is subsequently proven to be an NP-hard problem.Therefore,this paper designs the Long-Latency-Sensitive Weighted Bandwidth Greedy Scheduling Algorithm(LLS-WBG).Based on function dependencies and the longest completion time of predecessor functions,it calculates the server bandwidth with weights to optimize resource utilization and reduce the tail latency of tasks.Experimental results based on real-world data show that,in the edge computing scenario,compared with the state-of-the-art algorithms,the proposed algorithm can reduce the application completion time by 44.45%.

Key words: Serverless computing, Container, Edge computing, WebAssembly

中图分类号: 

  • TP338.8
[1]AKHTAR N,RAZA A,ISHAKIAN V,et al.Cose:Configuring Serverless Functions using Statistical Learning[C]//Procee-dings of the IEEE Conference on Computer Communications.IEEE,2020:129-138.
[2]Google.gVisor[EB/OL].[2024-10-21].https://gvisor.dev/.
[3]FUERST A,SHARMA P.FaaSCache:Keeping Serverless Computing Alive with Greedy-Dual Caching[C]//Proceedings of ACM International Conference on Architectural Support for Programming Languages and Operating Systems.2021:386-400.
[4]LIU X,WEN J,CHEN Z,et al.FaaSLight:General Application-Level Cold-Start Latency Optimization for Function-as-a-Service in Serverless Computing[J].ACM Transactions on Software Engineering and Methodology,2023,32(5):1-29.
[5]OAKES E,YANG L,ZHOU D,et al.SOCK:Rapid Task Provisioning with Serverless-Optimized Containers[C]//Proceedings of USENIX Annual Technical Conference(USENIX ATC 18).2018:57-70.
[6]SHAHRAD M,BALKIND J,WENTZLAFF D.ArchitecturalImplications of Function-as-a-Service Computing[C]//Procee-dings of the Annual IEEE/ACM International Symposium on Microarchitecture.2019:1063-1075.
[7]SHAHRAD M,FONSECA R,GOIRI I,et al.Serverless in the wild:Characterizing and Optimizing the Serverless Workload at a Large Cloud Provider[C]//Proceedings of USENIX Annual Technical Conference(USENIX ATC 20).2020:205-218.
[8]Amazon Web Services.AWS Lambda[EB/OL].[2024-09-11].https://aws.amazon.com/cn/lambda/.
[9]Microsoft.Cloud computing services | Microsoft Azure[EB/OL].[2024-09-11].https://azure.microsoft.com/en-us.
[10]Apache Software Foundation.Apache/OpenWhisk- ApacheOpenWhisk is an open source serverless cloud platform[EB/OL].[2024-12-25].https://github.com/apache/openwhisk.
[11]HALL A,RAMACHANDRAN U.An Execution Model forServerless Functions at the Edge[C]//Proceedings of the International Conference on Internet of Things Design and Implementation.2019:225-236.
[12]SHILLAKER S,PIETZUCH P.FaaSm:Lightweight Isolationfor Efficient Stateful Serverless Computing[C]//Proceedings of USENIX Annual Technical Conference(ATC 20).2020:419-433.
[13]SPIES B,MOCK M.An Evaluation of WebAssembly in Non-Web Environments[C]//Proceedings of XLVII Latin American Computing Conference(CLEI).IEEE,2021:1-10.
[14]Fermyon Technologies.Writing Spin applications[EB/OL].[2024-12-20].https://developer.fermyon.com/spin/v2/writing-apps.
[15]DE PALMA G,GIALLORENZO S,MAURO J,et al.Funless:Functions-as-a-Service for Private Edge Cloud Systems[J].ar-Xiv:2405.21009,2024.
[16]KJORVEZIROSKI V,FILIPOSKA S.WebAssembly Orchestration in the Context of Serverless Computing[J].Journal of Network and Systems Management,2023,31(3):62.
[17]LONG J,TAI H Y,HSIEH S T,et al.A Lightweight Design for Serverless Function as a Service[J].IEEE Software,2020,38(1):75-80.
[18]KJORVEZIROSKI V,FILIPOSKA S.WebAssembly as an Enabler for Next Generation Serverless Computing[J].Journal of Grid Computing,2023,21(3):34.
[19]JANGDA A,POWERS B,BERGER E D,et al.Not soFast:Analyzing the Performance of WebAssembly vs.Native Code[C]//Proceedings of USENIX Annual Technical Conference(USENIX ATC 19).2019:107-120.
[20]MENDKI P.Evaluating WebAssembly Enabled Serverless Approach for Edge Computing[C]//2020 IEEE Cloud Summit.IEEE,2020:161-166.
[21]KADUSALE I,GALA G,FOHLER G. WASM and Containers for Real-Time Serverless Edge Computing[J].JRWRTC,2024,2024:11-15.
[22]GACKSTATTER P,FRANGOUDIS P A,DUSTDAR S.Pu-shing Serverless to the Edge with WebAssembly Runtimes[C]//Proceedings of IEEE International Symposium on Cluster,Cloud and Internet Computing(CCGrid).IEEE,2022:140-149.
[23]VAHIDINIA P,FARAHANI B,ALIEE F S.Mitigating ColdStart Problem in Serverless Computing:A Reinforcement Learning Approach[J].IEEE Internet of Things Journal,2023,10(5):3917-3927.
[24]LEE S,YOON D,YEO S,et al.Mitigating Cold Start Problem in Serverless Computing with Function Fusion[J].Sensors,2021,21(24):8416.
[25]SILVA P,FIREMAN D,PEREIRA T E.Prebaking Functions to Warm the Serverless Cold Start[C]//Proceedings of the 21st International Middleware Conference.2020:1-13.
[26]GADEPALLI P K,MCBRIDE S,PEACH G,et al.Sledge:AServerless-First,Light-Weight Wasm Runtime for the Edge[C]//Proceedings of International Middleware Conference.2020:265-279.
[27]BRUCKER P.Scheduling algorithms[J].Journal-OperationalResearch Society,1999,50:774-774.
[28]LI Z,ZENG D,CHEN R.WebAssembly or Container? Joint Optimization of Microservice Consolidation and Deployment towards Cost Efficient Edge-End Consortium[C]//2024 IEEE/ACM 32nd International Symposium on Quality of Service(IWQoS).IEEE,2024:1-10.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!