검색 상세

PKVS 기반 마이크로 배치 스트리밍 시스템의 비동기 커밋 메커니즘

An Asynchronous Commit Mechanism in PKVS-based Micro-batch Streaming System

초록

영구적 키-값 저장소(Persistent Key Value Store, PKVS)를 사용하는 마이크로 배치 스트리밍 시스템은 다음과 같은 이유로 높은 꼬리 지연 시간을 발생시킨다. 첫째, 커밋 작업은 exactly-once 의미 체계를 보장하기 위해 크리티컬 패스 내에서 동기적으로 수행된다. 이는 필수적으로 크리티컬 패스로 인해 다른 후속 작업이 지연되고 이 커밋 작업 중에 데이터 소스에서 데이터가 계속해서 누적된다. 즉, 커밋 작업을 실행하는 데 걸리는 시간이 길어짐에 따라 다음 배치에서는 데이터 양이 증가하게 된다. 결과적으로 계속되는 악순환으로 인해 후속 커밋 작업의 실행 시간이 크게 늘어난다. 둘째, 커밋 작업 중 리모트 체크포인팅으로 인해 전체 커밋 작업의 실행 시간도 지연된다. 즉, PKVS는 컴팩션 작업을 위해 리모트 노드에서 메타데이터를 가져온 다음 컴팩션 된 파일을 해당 노드에 다시 작성한다. 이 프로세스로 인해 지연이 발생하고 잠재적으로 애플리케이션의 전반적인 성능이 저하된다. 이러한 문제를 극복하기 위해 본 논문에서는 PKVS 기반 마이크로 배치 스트리밍 시스템에서 비동기식 커밋 및 근접 체크포인팅 메커니즘을 제안하는 MiSAC을 소개한다. MiSAC은 시간이 많이 걸리는 커밋 작업을 쿼리 실행 및 계층적 체크포인팅과 오버래핑한다. 계층적 체크포인팅은 체크포인트 파일을 먼저 로컬 노드에 쓰고 체크포인트 내용을 다음 원격 노드에 복사한다. 본 논문에서는 가장 널리 사용되는 마이크로 배치 스트리밍 시스템 중 하나인 PKVS을 지원하는 Apache Spark 스트럭쳐 스트리밍에 MiSAC을 구현하였다. 실험 결과로, CPU 사양에 관계없이 MiSAC의 평균 지연 시간은 바닐라 스파크에 비해 2배 이상 감소하였다. 또한 바닐라 스파크에 비해 99번째에서 꼬리 지연 시간은 최대 84% 감소하고 평균 처리량은 최대 150% 향상되었다.

more

초록

Micro-batch streaming systems with persistent key-value store (PKVS) incurs high tail latency due to the following reasons. First, the commit operation is performed synchronously within the critical path to guarantee exactly-once semantics. This inherently delays other subsequent tasks along the path and causes the rapid data accumulation from data source during this commit operation. As the time taken to execute the commit operation is getting longer, the following batch faces an increased volume of data. As a result, this endless cycle significantly increases the execution times of subsequent commit operations. Second, the remote checkpointing during the commit operation also delays the execution time of the overall commit operation. That is, PKVS fetches metadata from a remote node for the compaction operation and subsequently rewrites the compacted file back to that node. This process incurs a stall, potentially degrading the overall performance of applications. To overcome these problems, this paper presents MiSAC that proposes asynchronous commit and near checkpointing mechanisms in the PKVS-based micro-batch streaming system. MiSAC overlaps the time-consuming commit operation with query execution and checkpoints hierarchically, writing first to the local node and copying the checkpoint contents to the remote node next. We implemented MiSAC on Apache Spark structured streaming with PKVS support, one of the most popular micro-batch streaming systems. Experimental results show that regardless of CPU specifications, the average latency of MiSAC is reduced by more than 2x compared to vanilla Spark. Additionally, compared to vanilla Spark, the tail latency is reduced by up to 84% at 99th, while the average throughput is improved by up to 150%.

more

목차

제 1 장 서론 1
제 2 장 배경지식 및 연구동기 5
2.1 마이크로 배치 스트리밍 시스템 5
2.2 연구동기 7
2.2.1 동기적 커밋 8
2.2.2 리모트 체크포인팅 10
제 3 장 디자인 12
3.1 MiSAC 아키텍쳐 12
3.1.1 MiSAC의 작업 흐름 13
3.1.2 일치성 처리 13
3.2 근접 체크포인팅 15
3.3 구현 16
제 4 장 실험 및 평가 17
4.1 실험 환경 설정 17
4.1.1 실험 구성 17
4.1.2 워크로드 17
4.1.3 비교 대상 19
4.2 성능 패턴 및 실행시간 20
4.3 꼬리 지연시간 및 처리량 21
4.4 지연시간과 처리량의 Trade-off 24
4.5 근접 체크포인팅의 효과 26
4.6 오버헤드 분석 27
제 5 장 관련연구 29
제 6 장 결론 및 향후 연구 31
참 고 문 헌 33

more