TAVARES, G. A.; http://lattes.cnpq.br/4420470364069506; TAVARES, Gabriel Alves.
Resumo:
Managed programming languages abstract away low-level memory management, enabling
programmers to focus on high-level concerns. In these programming languages, Automatic
Memory Management (AMM), often realized through a Garbage Collector (GC), automat
ically handles memory allocation and deallocation. While AMM mitigates memory-related
errors, its overhead can impact application performance. Modern GCs employ techniques
such as concurrency, generational memory management, and adaptive algorithms to mini
mize this performance impact.
This dissertation focus on GC strategies specifically tailored for Function-as-a-Service
(FaaS) applications. FaaS workloads exhibit a distinct memory usage pattern, characterized
by ephemeral and persistent objects. Unlike traditional, general purpose GC approaches,
in this work we propose and evaluate a novel GC algorithm, Serverless-Optimized Garbage
Collector (SOGC). SOGC takes advantage of FaaS unique characteristics to achieve signifi
cant efficiency gains.
A typical memory usage cycle in a FaaS function involves an initialization phase, dur
ing which data intended for the function’s entire lifetime is allocated, followed by an event
handling phase, characterized by ephemeral data that is used to process the event and then
promptly discarded. SOGC addresses this pattern by organizing memory into a layout that
includes a persistent space for long-lived data and a separate handler space for each event.
This efficient memory organization allows for rapid reclamation of unused data, minimizing
garbage collector-related interruptions during the execution of business logic.
To evaluate SOGC, we employ an analytical model, enabling a direct comparison with
classic GC algorithms. Through this model, we assess various scenarios, demonstrating that
SOGChas the potential to outperform existing solutions under certain conditions.