# Deep Reinforcement Learning-based Scheduling for Optimizing System Load and Response Time in Edge and Fog Computing Environments

엣지 및 포그 컴퓨팅 환경에서 시스템 부하와 응답 시간 최적화를 위한 심층 강화학습 기반 스케줄링

Zhiyu Wang, Mohammad Goudarzi, Mingming Gong, Rajkumar Buyya · arXiv · 2023년 9월 14일

- **연구 문제** 엣지·포그 환경에서 DAG 기반 IoT 응용을 스케줄링할 때 서버 부하 분산과 응답 시간을 함께 줄이는 문제를 다룹니다.
- **연구 방법** DRLIS는 스케줄링을 MDP로 정의하고 행동을 태스크별 서버 선택으로 두며, PPO의 클리핑 목적 함수와 actor-critic 구조로 정책을 갱신합니다. 보상은 부하 분산 변화와 응답 시간 차이를 정규화해 가중합한 값입니다.
- **주요 결과** Q-Learning 기반 스케줄러 대비 평균 성능이 서버 부하 분산 55%, 응용 응답 시간 37%, 가중 비용 50% 향상되었다고 보고합니다. 이 결과는 네 개 IoT 응용과 지정된 하드웨어 환경에서 얻은 것입니다.

## 연구 문제와 범위

엣지·포그 환경의 IoT 응용은 여러 태스크가 의존 관계를 가진 DAG로 표현되며, 서버는 요청이 몰리면 과부하되어 응답 시간과 부하 분산이 함께 영향을 받습니다. 이 스케줄링 문제는 NP-hard이며, 서버 성능과 사용률, 장애, 응용 요구가 불규칙하게 바뀌는 환경에서는 전역 정보와 사람의 조정에 의존하는 메타휴리스틱이나 규칙 기반 방법이 잘 맞지 않는다고 저자들은 설명합니다. 이 논문은 부하 분산과 응답 시간이라는 두 목표를 하나의 가중 비용으로 묶고, 이를 학습 기반 정책으로 풀려는 시도입니다.

## 부하 분산과 응답 시간의 수학적 정의

부하 분산은 서버 집합의 CPU 사용률과 RAM 사용률의 분산을 가중합한 Load Balancing Model로 측정되며, 응용 단위의 값은 태스크별 값을 더해 계산됩니다. 응답 시간은 Response Time Model로 정의되고, 태스크의 준비 시간과 처리 시간의 합으로 구성됩니다. 준비 시간은 부모 태스크에서 데이터를 보내는 전송 시간과 전파 시간에 따라 정해지며, 응용의 응답 시간은 critical path에 속한 태스크의 응답 시간만 더해 계산됩니다. 두 모델은 각각 최솟값과 최댓값으로 정규화된 뒤 가중합되어 Weighted Cost Model을 이룹니다. 실험에서는 부하 분산과 응답 시간의 가중치를 모두 0.5로 두어 두 목표를 같은 중요도로 취급합니다.

![Figure 2: Sample IoT application with the critical path in red color](https://refivu.com/papers/3091fc9c-0d18-40ca-8934-a5e35dcea955/figures/figure-426228b08536a9cab0f3ee8f741665e7.png?thumb=512)

**Figure 2** : Sample IoT application with the critical path in red color

[원문](https://arxiv.org/abs/2309.07407v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Zhiyu Wang, Mohammad Goudarzi, Mingming Gong, Rajkumar Buyya · Deep Reinforcement Learning-based Scheduling for Optimizing System Load and Response Time in Edge and Fog Computing Environments · 원문 그림 인용 · 원본 PDF 5쪽에서 그림 영역을 추출했습니다.

## 스케줄링을 MDP로 바꾸는 방식

DRLIS는 스케줄링을 MDP로 정의합니다. 상태는 현재 처리 중인 태스크의 특징과 서버 집합의 상태로 구성되며, 서버 집합에는 서버 수, CPU와 RAM 사용률, CPU 주파수와 RAM 크기, 서버 간 전파 시간과 대역폭이 포함됩니다. 행동은 현재 태스크를 어느 서버에 배치할지를 나타내는 서버 인덱스입니다. 부하 분산 보상은 배치 전후 부하 분산 모델의 차이이므로 배치 후 값이 낮아지면 양수가 됩니다. 응답 시간 보상은 평균 응답 시간과 현재 응답 시간의 차이이므로 현재 응답 시간이 평균보다 낮으면 양수입니다. 두 보상은 정규화되어 가중합되며, 배치가 실패하면 매우 큰 음의 penalty가 주어집니다.

## CLIP-PPO와 actor-critic 갱신

DRLIS는 PPO의 클리핑 방식을 기반으로 하며, actor-critic framework 안에서 정책과 가치 함수를 함께 학습합니다. PPO는 정책 그래디언트 계열에 속하고, 새 정책과 이전 정책의 확률 비율을 1−ε과 1+ε 사이로 제한하는 대리 목적 함수를 사용합니다. 저자들은 TRPO의 KL 제약 계산이 복잡하다는 점과 KL 페널티 방식보다 클리핑 방식이 실무에서 더 낫다는 점을 근거로 CLIP-PPO를 선택했습니다. 액터 네트워크는 행동을 출력하고 크리틱 네트워크는 상태 가치를 추정하며, 이 추정과 보상으로 TD error와 어드밴티지를 계산합니다. 전체 손실은 정책 목적에 음의 부호를 붙이고 가치 손실을 더하며 entropy bonus를 뺀 형태입니다.

DRLIS는 새 액터, 이전 액터, 크리틱의 세 네트워크를 유지하며, T 단계 동안 수집한 데이터로 K번 갱신한 뒤 이전 액터를 새 액터로 복사합니다. 저자들은 이산 행동 공간에서 TD3는 연속 제어용으로 설계되었고 SAC는 이산 공간에 특별한 확장이 필요하다고 보아 PPO를 기반으로 택했습니다.

## FogBus2 안에서의 실행 흐름

DRLIS는 FogBus2의 Master 컴포넌트에 있는 스케줄링 모듈로 구현되었습니다. 스케줄러는 사용 가능한 액터를 확인한 뒤 태스크마다 현재 상태를 만들고, 액터 네트워크가 고른 서버에 태스크를 배치합니다. 배치 후 액터는 CPU와 RAM 사용률 같은 정보를, 사용자 구성요소는 응답 시간 같은 정보를 보내며, 충분한 정보가 모이면 보상을 계산하고 정책을 갱신합니다. 구현된 강화학습 모듈은 강화학습 모델, 보상 모델, 에이전트, 모델 저장소의 네 하위 모듈로 나뉘며, 학습된 하이퍼파라미터는 모델 저장소에 저장되어 다시 불러올 수 있습니다.

## 실험 환경과 비교 기준

실험은 IoT 장치, 자원이 제한된 포그 서버, 자원이 풍부한 클라우드 서버가 섞인 이기종 환경에서 수행되었습니다. 클라우드로는 두 개의 Nectar 인스턴스와 한 개의 AWS 인스턴스를 사용했고, 포그 서버로는 Raspberry Pi 3B, MacBook Pro, Linux 가상 머신을 사용했습니다. 실험 응용은 Face Detection, Color Tracking, Face And Eye Detection, Video OCR의 네 개이며, 센서와 액추에이터 구조에서 실시간과 비실시간 입력을 처리합니다. 비교 기준은 메타휴리스틱인 NSGA2와 NSGA3, 강화학습인 DQN과 Q-Learning입니다.

DRLIS의 신경망은 3층 구조에 은닉층 64 유닛과 TanH를 사용하며, 클리핑 범위 0.3, 할인율 0.9, 액터 학습률 0.0003, 크리틱 학습률 0.001로 탐색을 거쳐 정했다고 보고됩니다. 이 설정은 DRLIS에 대한 탐색 결과이며, 기준 기법은 별도로 튜닝되었습니다.

![Figure 1: A view of the IoT system in fog computing](https://refivu.com/papers/3091fc9c-0d18-40ca-8934-a5e35dcea955/figures/figure-c2f46620164403b0049648b011f0f48d.png?thumb=512)

**Figure 1** : A view of the IoT system in fog computing

[원문](https://arxiv.org/abs/2309.07407v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Zhiyu Wang, Mohammad Goudarzi, Mingming Gong, Rajkumar Buyya · Deep Reinforcement Learning-based Scheduling for Optimizing System Load and Response Time in Edge and Fog Computing Environments · 원문 그림 인용 · 원본 PDF 5쪽에서 그림 영역을 추출했습니다.

## 학습 수렴과 평가 단계의 결과

학습 단계는 해상도 480으로 최대 100회 정책 갱신까지 수행되었습니다. 이 단계에서 Q-Learning, DQN, DRLIS는 부하 분산과 가중 비용에서 NSGA2와 NSGA3보다 낮은 값으로 수렴했고, NSGA2와 NSGA3는 부하 분산과 가중 비용에서 안정 상태에 이르지 못했습니다. DRLIS는 부하 분산에서 약 20회, 가중 비용에서 약 30회 갱신으로 수렴했고, Q-Learning은 60회 이상, DQN은 80회 이상이 필요했다고 보고됩니다. 응답 시간에서는 모든 기법이 수렴했으며, 강화학습 기법의 평균 응답 시간이 NSGA2와 NSGA3보다 낮았습니다. 평가 단계는 해상도 240으로 수행되었고, 가중 비용에서는 Q-Learning, DQN, DRLIS만 수렴했습니다.

이때 DRLIS의 평균과 최종 비용은 Q-Learning과 DQN보다 낮았습니다. 저자들은 Q-Learning 기반 스케줄러 대비 평균 성능이 서버 부하 분산 55%, 응용 응답 시간 37%, 가중 비용 50% 향상되었다고 정리합니다. 이 수치는 Q-Learning 기반 스케줄러와의 비교이며, 수렴 속도 비교와는 구분해서 읽어야 합니다.

## 스케줄링 오버헤드 비교

스케줄링 오버헤드는 100라운드 동안 네 응용을 처리한 총 시간을 100으로 나눈 평균으로 측정되었고, 95% 신뢰구간과 함께 보고됩니다. 강화학습 기법인 DRLIS, DQN, Q-Learning은 대체로 NSGA2와 NSGA3보다 오버헤드가 낮고 신뢰구간도 더 짧습니다. DRLIS의 scheduling overhead는 NSGA2와 NSGA3보다 50% 넘게, DQN보다 33% 넘게 낮지만 Q-Learning보다는 약 2ms 큽니다. 저자들은 DRLIS의 수렴 속도가 Q-Learning보다 훨씬 빠르므로 이 차이가 무시할 만하다고 해석합니다.

![Figure 8: Average scheduling overhead with a 95% CNFI](https://refivu.com/papers/3091fc9c-0d18-40ca-8934-a5e35dcea955/figures/figure-2094d5a3741066f74abd18d45a939963.png?thumb=512)

**Figure 8** : Average scheduling overhead with a 95% CNFI

[원문](https://arxiv.org/abs/2309.07407v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Zhiyu Wang, Mohammad Goudarzi, Mingming Gong, Rajkumar Buyya · Deep Reinforcement Learning-based Scheduling for Optimizing System Load and Response Time in Edge and Fog Computing Environments · 원문 그림 인용 · 원본 PDF 16쪽에서 그림 영역을 추출했습니다.

## 결과의 적용 범위와 확인할 점

평가는 저자들이 구성한 네 개 IoT 응용과 지정된 클라우드 및 포그 하드웨어에서 얻은 결과입니다. 학습 단계 비교는 최대 100회 정책 갱신 안에서 수행되었으므로, NSGA2와 NSGA3가 수렴하지 못했다는 관찰은 이 예산 안의 결과로 읽어야 합니다. 결론 절의 개선 폭인 최대 49%, 60%, 55%는 초록과 6.3.1의 55%, 37%, 50%와 다르므로 비교 대상과 집계 방식을 확인해야 합니다. 다른 응용, 다른 하드웨어, 다른 서버 장애 조건으로 결과를 넓히려면 추가 실험이 필요합니다.

## 논문 정보

- **저자**: Zhiyu Wang, Mohammad Goudarzi, Mingming Gong, Rajkumar Buyya
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2023년 9월 14일
- **등록일**: 2026년 11월 6일
- **수정일**: 2023년 10월 23일
- **버전**: v2
- **arXiv**: 2309.07407
- **분류**: cs.DC
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

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

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

## 초록

Edge/fog computing, as a distributed computing paradigm, satisfies the low-latency requirements of ever-increasing number of IoT applications and has become the mainstream computing paradigm behind IoT applications. However, because large number of IoT applications require execution on the edge/fog resources, the servers may be overloaded. Hence, it may disrupt the edge/fog servers and also negatively affect IoT applications' response time. Moreover, many IoT applications are composed of dependent components incurring extra constraints for their execution. Besides, edge/fog computing environments and IoT applications are inherently dynamic and stochastic. Thus, efficient and adaptive scheduling of IoT applications in heterogeneous edge/fog computing environments is of paramount importance. However, limited computational resources on edge/fog servers imposes an extra burden for applying optimal but computationally demanding techniques. To overcome these challenges, we propose a Deep Reinforcement Learning-based IoT application Scheduling algorithm, called DRLIS to adaptively and efficiently optimize the response time of heterogeneous IoT applications and balance the load of the edge/fog servers. We implemented DRLIS as a practical scheduler in the FogBus2 function-as-a-service framework for creating an edge-fog-cloud integrated serverless computing environment. Results obtained from extensive experiments show that DRLIS significantly reduces the execution cost of IoT applications by up to 55%, 37%, and 50% in terms of load balancing, response time, and weighted cost, respectively, compared with metaheuristic algorithms and other reinforcement learning techniques.

## 원문 인용

Zhiyu Wang, Mohammad Goudarzi, Mingming Gong, Rajkumar Buyya (2023). Deep Reinforcement Learning-based Scheduling for Optimizing System Load and Response Time in Edge and Fog Computing Environments. arXiv:2309.07407v2. https://arxiv.org/abs/2309.07407v2

**BibTeX**

```
@misc{wang2023deep,
  title = {{Deep Reinforcement Learning-based Scheduling for Optimizing System Load and Response Time in Edge and Fog Computing Environments}},
  author = {Zhiyu Wang and Mohammad Goudarzi and Mingming Gong and Rajkumar Buyya},
  year = {2023},
  eprint = {2309.07407},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.07407v2}
}
```

## 이 논문의 용어

- [PPO](https://refivu.com/terms/21c34991d674-ppo)
- [Q-learning](https://refivu.com/terms/e20b416cb2f7-q-learning)
- [DQN](https://refivu.com/terms/6263174655b5-dqn)
- [policy gradient](https://refivu.com/terms/abaf88e7ce4d-policy-gradient)
- [importance sampling](https://refivu.com/terms/f730041e2218-importance-sampling)
- [Kullback-Leibler divergence](https://refivu.com/terms/3aa99486ee6b-kullback-leibler-divergence)
- [TD error](https://refivu.com/terms/6451ae47eb74-td-error)
- [TRPO](https://refivu.com/terms/da74e29ad46a-trpo)
- [entropy bonus](https://refivu.com/terms/fbdf17c4faed-entropy-bonus)
- [Critical path](https://refivu.com/terms/115401ab4a7b-critical-path)
- [Face detection](https://refivu.com/terms/cc34ae03fd51-face-detection)

## 다른 논문 해설

- [Quantum agents in the Gym: a variational quantum algorithm for deep Q-learning](https://refivu.com/papers/61131563-04fb-4585-b080-efba1e8d4a85-quantum-agents-in-the-gym-a-variational-quantum.md)
- [Diffusion-based Reinforcement Learning for Edge-enabled AI-Generated Content Services](https://refivu.com/papers/1f3360a8-f142-465a-88d4-2944cf4943bd-diffusion-based-reinforcement-learning-for-edge-enabled-ai.md)
- [Deep Multiagent Reinforcement Learning: Challenges and Directions](https://refivu.com/papers/4e3f1d3b-94ab-4d97-b560-149d99954193-deep-multiagent-reinforcement-learning-challenges-and.md)
- [Deep Q-Learning based Reinforcement Learning Approach for Network Intrusion Detection](https://refivu.com/papers/0e0fba9c-de99-433f-a5f5-56cc10aa2ef8-deep-q-learning-based-reinforcement-learning-approach-for.md)
- [Online Model-Free Reinforcement Learning for the Automatic Control of a Flexible Wing Aircraft](https://refivu.com/papers/ba36d890-9284-4305-a476-e058d78348ca-online-model-free-reinforcement-learning-for-the-automatic.md)
- [Variational Quantum Circuits for Deep Reinforcement Learning](https://refivu.com/papers/f6af79b4-b092-4c2a-8589-70b19b37fcc5-variational-quantum-circuits-for-deep-reinforcement-learning.md)
- [Real-World Humanoid Locomotion with Reinforcement Learning](https://refivu.com/papers/8e42e14f-83b7-4879-ab8c-1bd8a7bcea8a-real-world-humanoid-locomotion-with-reinforcement-learning.md)
- [Automatic acoustic detection of birds through deep learning: the first Bird Audio Detection challenge](https://refivu.com/papers/ffc7e794-5a19-4eef-a9d9-5a912594e0d1-automatic-acoustic-detection-of-birds-through-deep-learning.md)
- [Taxon and trait recognition from digitized herbarium specimens using deep convolutional neural networks](https://refivu.com/papers/e5ba6ec9-008d-4521-9364-6dca94651f8e-taxon-and-trait-recognition-from-digitized-herbarium.md)
- [Hiding Data in Images Using Cryptography and Deep Neural Network](https://refivu.com/papers/5f176b74-deef-4194-9cc9-ff65d30db05b-hiding-data-in-images-using-cryptography-and-deep.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/3091fc9c-0d18-40ca-8934-a5e35dcea955-deep-reinforcement-learning-based-scheduling-for-optimizing)
