# A Deep Recurrent-Reinforcement Learning Method for Intelligent AutoScaling of Serverless Functions

서버리스 함수의 지능형 자동 확장을 위한 심층 순환 강화학습 방법

Siddharth Agarwal, Maria A. Rodriguez, Rajkumar Buyya · arXiv · 2023년 8월 11일

- **연구 문제** 서버리스 함수의 자동 확장은 임계값 설정에 의존해 부하 변화와 부분 관측 환경에 대응하기 어렵습니다.
- **연구 방법** LSTM 계층을 PPO의 액터와 크리틱에 결합한 LSTM-PPO 에이전트를 모델-프리 POMDP로 학습시킵니다.
- **주요 결과** 행렬 곱셈 워크로드의 200개 샘플링 윈도우 평가에서 RPPO는 PPO 대비 처리량을 18% 높였습니다.

## 기존 임계값 기반 자동 확장의 한계

서버리스 함수는 짧게 실행되고 부하가 자주 변하기 때문에 자동 확장이 성능을 좌우합니다. 기존 FaaS 플랫폼은 CPU나 메모리 같은 모니터링 지표가 임계값을 넘는지에 따라 함수 복제본 수를 조정합니다. 이 방식은 임계값을 설정하려면 전문 지식, 과거 데이터, 환경 전체에 대한 정보가 필요하며, 콜드 스타트와 히스테리시스 문제를 일으킬 수 있습니다.

이 논문은 이 문제를 강화학습으로 다룹니다. 다만 실제 클라우드 환경은 관측이 제한된 부분 관측 환경이므로, 저자들은 자동 확장을 모델-프리 POMDP로 정식화하고 순환 신경망인 LSTM을 PPO에 결합한 LSTM-PPO 에이전트를 제안합니다. 연구 질문은 이 에이전트가 PPO, DRQN, 임계값 기반 수평 확장보다 처리량과 자원 활용을 개선할 수 있는지입니다.

## LSTM-PPO 에이전트와 POMDP 정식화

자동 확장 문제는 샘플링 윈도우마다 관측을 받고 함수 인스턴스 수를 조정하는 순차 결정 문제로 정의됩니다. 관측 튜플은 평균 실행 시간, 처리량 비율, 요청 수, 함수 복제본 수, 평균 CPU 및 메모리 사용률로 구성됩니다. 행동은 인스턴스 수를 −k에서 +k 범위로 바꾸는 것이며, 복제본 수가 최소값과 최대값 사이에 머물도록 제한됩니다.

![Table 2: Notations](https://refivu.com/papers/481bcaea-737d-4460-aa62-4037d8b86743/figures/figure-22be87037f3879042e655be241556fe6.png?thumb=512)

**TABLE 2** : Notations

[원문](https://arxiv.org/abs/2308.05937v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Siddharth Agarwal, Maria A. Rodriguez, Rajkumar Buyya · A Deep Recurrent-Reinforcement Learning Method for Intelligent AutoScaling of Serverless Functions · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.

LSTM-PPO는 PPO의 액터와 크리틱 네트워크 모두에 LSTM 계층을 넣습니다. LSTM 출력은 완전연결 MLP로 전달되며, 파라미터는 PPO 클리핑 대리 목적 함수로 갱신됩니다. 여기서 확률비는 현재 정책과 이전 정책의 행동 확률 비율이며, 클리핑 구간 1 − ϵ과 1 + ϵ이 갱신 크기를 제한합니다. 보상은 처리량 비율, 복제본 수와 최소 복제본 수의 차이, CPU와 메모리 사용률의 합으로 구성되며, 허용되지 않는 행동에는 음의 즉시 보상이 주어집니다.

![Figure 2: DRL agent structure for Autoscaling](https://refivu.com/papers/481bcaea-737d-4460-aa62-4037d8b86743/figures/figure-454264a13f4ab8f20aa3213eb1533d0b.png?thumb=512)

**Fig. 2** : DRL agent structure for Autoscaling

[원문](https://arxiv.org/abs/2308.05937v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Siddharth Agarwal, Maria A. Rodriguez, Rajkumar Buyya · A Deep Recurrent-Reinforcement Learning Method for Intelligent AutoScaling of Serverless Functions · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.

![Table 4: RL Environment and Network Parameters](https://refivu.com/papers/481bcaea-737d-4460-aa62-4037d8b86743/figures/figure-234a31a8021d41bd6ce411553df67fd2.png?thumb=512)

**TABLE 4** : RL Environment and Network Parameters

[원문](https://arxiv.org/abs/2308.05937v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Siddharth Agarwal, Maria A. Rodriguez, Rajkumar Buyya · A Deep Recurrent-Reinforcement Learning Method for Intelligent AutoScaling of Serverless Functions · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

## 실험 환경과 비교 설정

실험은 Melbourne Research Cloud의 다중 노드 MicroK8s 클러스터에서 OpenFaaS와 Prometheus를 사용해 수행되었습니다. 대상 함수는 행렬 곱셈이며 입력 크기는 small, medium, large로 나뉩니다. 요청 부하는 Azure 함수 공개 호출 추적을 기반으로 생성되었고, 샘플링 윈도우는 30초, 에피소드는 5분으로 설정되었습니다.

![Table 3: Parameters for System Setup](https://refivu.com/papers/481bcaea-737d-4460-aa62-4037d8b86743/figures/figure-861d8eeab5c3b976876686cbece8e807.png?thumb=512)

**TABLE 3** : Parameters for System Setup

[원문](https://arxiv.org/abs/2308.05937v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Siddharth Agarwal, Maria A. Rodriguez, Rajkumar Buyya · A Deep Recurrent-Reinforcement Learning Method for Intelligent AutoScaling of Serverless Functions · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

비교 대상은 같은 액터와 크리틱 구조를 쓰는 PPO, LSTM 계층을 포함한 DRQN, CPU 사용률 임계값 기반 HPA, 요청 처리율 기반 rps 확장 정책입니다. 이 설정은 행렬 곱셈 함수와 해당 워크로드에 대한 실험 조건이며, 다른 함수나 데이터로 확대된 결과가 아닙니다.

## 처리량과 성공률의 비교 결과

학습 보상 곡선에서 PPO의 평균 에피소드 보상은 400 에피소드 이후 감소했지만, LSTM-PPO는 더 높은 값을 유지했습니다. DRQN의 평균 에피소드 보상은 RPPO에 가까웠으나, DRQN은 복제본을 적게 유지하는 경향을 보였습니다.

200개 샘플링 윈도우 평가에서 RPPO는 PPO보다 처리량이 18% 높았고, 평균 성공률은 85%로 PPO의 67%와 비교되었습니다. DRQN은 워크로드의 22%를 처리하지 못했고 평균 성공률은 66%였습니다. 이 수치는 해당 행렬 곱셈 워크로드에서 얻은 결과입니다.

## 임계값 기반 기준선과의 비교

HPA는 CPU 사용률 목표를 75%로 설정하고 최대 24개 인스턴스까지 확장하도록 구성되었습니다. HPA는 평균 80%의 입력 부하를 처리했지만 복제본 수가 변동했고, RPPO 대비 처리 성능이 35% 낮았습니다. rps 기준선은 10초 동안 5를 초과하는 요청 처리율을 기준으로 확장하며, 단일 인스턴스 중심으로 동작해 입력 부하의 약 50%만 처리했습니다.

결론부는 RPPO가 PPO, DRQN, HPA, rps 확장 정책 대비 처리량을 각각 18%, 22%, 35%, 58% 향상시킨다고 보고합니다. 이 수치들은 같은 실험 설정에서 비교된 결과로 읽어야 합니다.

## 학습 비용, 일반화, 한계

제안 방법은 500개 이상의 에피소드, 약 6000개 샘플링 윈도우의 학습을 거쳤고, 실시간 시스템에서 RL 학습은 데이터와 시간 비용이 큽니다. 학습된 에이전트는 개별 함수의 자원 요구 프로필과 워크로드에 맞춰 학습되므로 다른 함수로 바로 일반화된다고 볼 수 없으며, 전이 학습이나 함수 분류가 향후 과제로 제시됩니다.

또한 행동 공간에서 불가능한 행동을 배우는 데 학습 시간이 소요되어 행동 마스킹이 향후 과제로 언급됩니다. 메트릭 수집 병목과 단일 장애점 문제도 저자가 향후 연구로 언급한 한계입니다.

## 논문 정보

- **저자**: Siddharth Agarwal, Maria A. Rodriguez, Rajkumar Buyya
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2023년 8월 11일
- **등록일**: 2026년 11월 6일
- **수정일**: 2024년 11월 11일
- **버전**: v2
- **arXiv**: 2308.05937
- **DOI**: 10.1109/tsc.2024.3387661
- **분류**: cs.DC · cs.AI · eess.SY
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2308.05937v2) · [원문 PDF ↗](https://arxiv.org/pdf/2308.05937v2)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

FaaS introduces a lightweight, function-based cloud execution model that finds its relevance in a range of applications like IoT-edge data processing and anomaly detection. While cloud service providers offer a near-infinite function elasticity, these applications often experience fluctuating workloads and stricter performance constraints. A typical CSP strategy is to empirically determine and adjust desired function instances or resources, known as autoscaling, based on monitoring-based thresholds such as CPU or memory, to cope with demand and performance. However, threshold configuration either requires expert knowledge, historical data or a complete view of the environment, making autoscaling a performance bottleneck that lacks an adaptable solution. RL algorithms are proven to be beneficial in analysing complex cloud environments and result in an adaptable policy that maximizes the expected objectives. Most realistic cloud environments usually involve operational interference and have limited visibility, making them partially observable. A general solution to tackle observability in highly dynamic settings is to integrate Recurrent units with model-free RL algorithms and model a decision process as a POMDP. Therefore, in this paper, we investigate model-free Recurrent RL agents for function autoscaling and compare them against the model-free PPO algorithm. We explore the integration of a LSTM network with the state-of-the-art PPO algorithm to find that under our experimental and evaluation settings, recurrent policies were able to capture the environment parameters and show promising results for function autoscaling. We further compare a PPO-based autoscaling agent with commercially used threshold-based function autoscaling and posit that a LSTM-based autoscaling agent is able to improve throughput by 18%, function execution by 13% and account for 8.4% more function instances.

## 원문 인용

Siddharth Agarwal, Maria A. Rodriguez, Rajkumar Buyya (2023). A Deep Recurrent-Reinforcement Learning Method for Intelligent AutoScaling of Serverless Functions. arXiv:2308.05937v2. https://doi.org/10.1109/tsc.2024.3387661

**BibTeX**

```
@article{agarwal2023deep,
  title = {{A Deep Recurrent-Reinforcement Learning Method for Intelligent AutoScaling of Serverless Functions}},
  author = {Siddharth Agarwal and Maria A. Rodriguez and Rajkumar Buyya},
  year = {2023},
  eprint = {2308.05937},
  archivePrefix = {arXiv},
  doi = {10.1109/tsc.2024.3387661},
  url = {https://arxiv.org/abs/2308.05937v2}
}
```

## 이 논문의 용어

- [actor-critic](https://refivu.com/terms/080ed1efed92-actor-critic)
- [POMDP](https://refivu.com/terms/1c9c6e27aaa2-pomdp)
- [Matrix Multiplication](https://refivu.com/terms/c7dfe6221cda-matrix-multiplication)
- [Belief state](https://refivu.com/terms/d3e4c79194ec-belief-state)
- [Prometheus](https://refivu.com/terms/1dd45cde7ecb-prometheus)
- [Proximal Policy Optimisation](https://refivu.com/terms/6c81935720fc-proximal-policy-optimisation)

## 다른 논문 해설

- [Breaking the Sample Size Barrier in Model-Based Reinforcement Learning with a Generative Model](https://refivu.com/papers/2b973766-1ce3-4254-a4f3-a27011ee0f12-breaking-the-sample-size-barrier-in-model-based.md)
- [Beam Management in Ultra-dense mmWave Network via Federated Reinforcement Learning: An Intelligent and Secure Approach](https://refivu.com/papers/18fc180c-ea77-4a70-9f6f-3c638b52b7dd-beam-management-in-ultra-dense-mmwave-network-via.md)
- [Robust Output Regulation and Reinforcement Learning-based Output Tracking Design for Unknown Linear Discrete-Time Systems](https://refivu.com/papers/c891cf57-5ab7-49b3-8678-176cfd88db96-robust-output-regulation-and-reinforcement-learning-based.md)
- [Hybrid Reinforcement Learning for STAR-RISs: A Coupled Phase-Shift Model Based Beamformer](https://refivu.com/papers/e6d90f1b-a6bd-45cf-b7ba-aec5f0948ff6-hybrid-reinforcement-learning-for-star-riss-a-coupled.md)
- [Communication and Computation O-RAN Resource Slicing for URLLC Services Using Deep Reinforcement Learning](https://refivu.com/papers/5ddc57a5-9cb1-4669-ba8e-74c4ee4a318e-communication-and-computation-o-ran-resource-slicing-for.md)
- [Robust Adversarial Attacks Detection based on Explainable Deep Reinforcement Learning For UAV Guidance and Planning](https://refivu.com/papers/6395f351-25ef-4ced-8544-55edc7675127-robust-adversarial-attacks-detection-based-on-explainable.md)
- [Paper Plain: Making Medical Research Papers Approachable to Healthcare Consumers with Natural Language Processing](https://refivu.com/papers/1dc14dd3-4273-4166-8176-763117352ecc-paper-plain-making-medical-research-papers-approachable-to.md)
- [On Semidefinite Relaxations for Matrix-Weighted State-Estimation Problems in Robotics](https://refivu.com/papers/1cbd32dc-b73f-4a8a-82a4-9e5a3766df52-on-semidefinite-relaxations-for-matrix-weighted-state.md)
- [A Review on Methods and Applications in Multimodal Deep Learning](https://refivu.com/papers/42e28e81-f0e0-44a5-86c2-f7a960cd2b23-a-review-on-methods-and-applications-in-multimodal.md)
- [SiamMask: A Framework for Fast Online Object Tracking and Segmentation](https://refivu.com/papers/787996d1-9244-4fb7-8021-225539408b8f-siammask-a-framework-for-fast-online-object-tracking.md)
- [Large language models predict human sensory judgments across six modalities](https://refivu.com/papers/9aa2c809-2caf-4837-9f90-b62ba45e52a6-large-language-models-predict-human-sensory-judgments-across.md)
- [Overview of Computer Vision Techniques in Robotized Wire Harness Assembly: Current State and Future Opportunities](https://refivu.com/papers/9b8e9ce1-c116-4807-98f2-9aed20836702-overview-of-computer-vision-techniques-in-robotized-wire.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/481bcaea-737d-4460-aa62-4037d8b86743-a-deep-recurrent-reinforcement-learning-method-for)
