Serverless computing abstracts away server management, enabling automatic scaling and efficient resource utilization. However, cold-start latency remains a significant challenge, affecting end-to-end performance. Our preliminary study reveals that inefficient library initialization and usage are major contributors to this latency in Python-based serverless applications. We introduce LibProf, a Python profiler that uses dynamic program analysis to identify inefficient library initializations. LibProf collects library usage data through statistical sampling and call-path profiling, then generates a report to guide developers in addressing four types of inefficiency patterns. Systematic evaluations on 15 serverless applications demonstrate that LibProf effectively identifies inefficiencies. LibProf guided optimization results up to 2.26x speedup in cold-start execution time and 1.51x reduction in memory usage.
翻译:无服务器计算抽象了服务器管理,实现了自动扩缩容和高效的资源利用。然而,冷启动延迟仍然是一个重大挑战,影响着端到端的性能。我们的初步研究表明,在基于Python的无服务器应用中,低效的库初始化和使用是造成此延迟的主要原因。我们提出了LibProf,一种利用动态程序分析来识别低效库初始化的Python性能分析器。LibProf通过统计采样和调用路径剖析来收集库使用数据,然后生成报告以指导开发者处理四种类型的低效模式。在15个无服务器应用上的系统评估表明,LibProf能有效识别低效问题。经LibProf指导的优化,使冷启动执行时间最高加速了2.26倍,内存使用量减少了1.51倍。