[논문 리뷰] Scalable String and Suffix Sorting: Algorithms, Techniques, and Tools
이 학위 논문은 공유 메모리, 외부 메모리, 분산 시스템 환경에서 스트링 및 서피크스 정렬을 위한 확장 가능한 알고리즘을 제시한다. 다중 코어 최적화를 통한 병렬 스트링 정렬, 유도 정렬을 활용한 외부 메모리 서피크스 정렬, 그리고 대규모 데이터를 위한 신규 분산 프레임워크(Thrill)를 도입하여 대규모 워크로드에서 높은 성능과 선형 확장성을 달성한다.
This dissertation focuses on two fundamental sorting problems: string sorting and suffix sorting. The first part considers parallel string sorting on shared-memory multi-core machines, the second part external memory suffix sorting using the induced sorting principle, and the third part distributed external memory suffix sorting with a new distributed algorithmic big data framework named Thrill. Sorting strings or vectors is a basic algorithmic challenge different from integer sorting because it is important to access components of the keys to avoid repeated operations on the entire string. We focus on sorting large inputs which fit into the RAM of a shared-memory machine. String sorting is needed for instance in database index construction, suffix sorting algorithms, and to order high-dimensional geometric data. We first survey engineered variants of basic sequential string sorting algorithms and perform an extensive experimental evaluation to measure their performance. Furthermore, we perform experiments to quantify parallel memory bandwidth and latency experiments as preliminary work for designing parallel string sorting algorithms. We then propose string sample sort as an adaptation of sample sort to string objects and present its engineered version Super Scalar String Sample Sort. This parallel-ready algorithm runs in O(D/w + n log n) expected time, makes effective use of the cache hierarchy, uses word- and instruction-level parallelism, and avoids branch mispredictions. Our parallelization named Parallel Super Scalar String Sample Sort (pS5) employs voluntary work sharing for load balancing and is the overall best performing algorithm on single-socket multi-core machines in our experiments. For platforms with non-uniform memory access (NUMA) we propose to run pS5 on each NUMA node independently and then merge the sorted string sequences. To accelerate the merge with longest common prefix (LCP) values we present a new LCP-aware multiway merge algorithm using a tournament tree. The merge algorithm is also used to construct a stand-alone LCP-aware K-way mergesort, which runs in O(D + n log n + n/K) time and benefits from long common prefixes in the input. Broadly speaking, we propose both multiway distribution-based with string sample sort and multiway merge-based string sorting with LCP-aware merge and mergesort, and engineer and parallelize both approaches. We also present parallelizations of multikey quicksort and radix sort, and perform an extensive experimental evaluation using six machines and seven inputs. For all input instances, except random strings and URLs, pS5 achieves higher speedups on modern single-socket multi-core machines than our own parallel multikey quicksort and radix sort implementations, which are already better than any previous ones. On multi-socket NUMA machines pS5 combined with the LCP-aware top-level multiway merging was fastest on most inputs. We then turn our focus to suffix sorting, which is equivalent to suffix array construction. The suffix array is one of the most popular text indexes and can be used for fast substring search in DNA or text corpora, in compression applications, and is the basis for many string algorithms. When augmented with the LCP array and additional tables, the suffix array can emulate the suffix tree in a myriad of stringology algorithms. Our goal is to create fast and scalable suffix sorting algorithms to generate large suffix arrays for real-world inputs. As introduction to suffix array construction, we first present a brief survey of their principles and history. Our initial contribution to this field is eSAIS, the first external memory suffix sorting algorithm which uses the induced sorting principle. Its central loop is an elegant reformulation of this principle using an external memory priority queue, and our theoretical analysis shows that eSAIS requires at most Sort(17n) + Scan(9n) I/O volume. We then extend eSAIS to also construct the LCP array while suffix sorting, which yields the first implementation of fully external memory suffix and LCP array construction in the literature. Our experiments demonstrate that eSAIS is a factor two faster than DC3, the previously best external memory suffix sorting implementation. After our initial publication of eSAIS, many authors showed interest in the topic and we review their contributions and improvements over eSAIS. For scaling to even larger inputs, we then consider suffix sorting on a distributed cluster machine. To harness the computational power of a such a system in a convenient data-flow style functional programming paradigm, we propose the new high-performance distributed big data processing framework Thrill. Thrill’s central concept is a distributed immutable array (DIA), which is a virtual array of C++ objects distributed onto the cluster. Such arrays can be manipulated using a small set of scalable primitives, such as mapping, reducing, and sorting. These are implemented using pipelined distributed external memory algorithms encapsulated as C++ template classes, which can be efficiently coupled to form large complex applications. Our Thrill prototype is evaluated using five micro benchmarks against the popular frameworks Apache Spark and Flink on up to 16 hosts in the AWS Elastic Compute Cloud. Thrill consistently outperforms the other frameworks in all benchmarks and on all numbers of hosts. Using Thrill we then implement five suffix sorting algorithms as a case study. Three are based on prefix doubling and two are variants of the linear-time difference cover algorithm DC. The implementation of these complex algorithms demonstrates the expressiveness of the scalable primitives provided by Thrill. They also are the first distributed external memory suffix sorters presented in the literature. We compare them experimentally against two hand-coded MPI implementations and the fastest non-distributed sequential suffix sorters. Our results show that algorithms implemented using Thrill are competitive to MPI programs, but scale to larger inputs due to automatic usage of external memory. In the future, these implementations can benefit from improvements of Thrill such as fault tolerance or specialized sorting algorithms.
연구 동기 및 목표
- 제한된 메모리와 높은 데이터 볼륨을 가진 현대 컴퓨팅 환경에서 대규모 스트링 및 서피크스를 효율적으로 정렬하는 도전 과제를 해결한다.
- 병렬 처리를 활용하고 성능을 향상시키기 위해 공유 메모리 다중 코어 아키텍처에서 스트링 정렬을 위한 확장 가능한 솔루션을 개발한다.
- 메인 메모리보다 큰 데이터셋을 처리하기 위해 유도 정렬 기반의 외부 메모리 서피크스 정렬 알고리즘을 설계한다.
- 단일 기계의 한계를 초월해 확장 가능한 분산 서피크스 정렬 프레임워크를 Thrill 대규모 데이터 처리 시스템을 사용해 구축한다.
- 다양한 하드웨어 및 데이터 크기에서 실제 성능과 선형 확장성 측면에서 제안된 알고리즘을 평가하고 최적화한다.
제안 방법
- 공유 메모리 다중 코어 시스템에서 워크스틸링 작업 스케줄링을 활용한 다중 방향 병합 조인 방식을 사용해 병렬 스트링 정렬을 구현한다.
- 유도 정렬 원리를 적용하여 외부 메모리에서 효율적으로 서피크스 배열을 구성함으로써 랜덤 I/O를 최소화하고 순차적 액세스를 최대화한다.
- 서피크스 정렬 파이프라인을 Thrill 분산 데이터플로우 프레임워크에 통합하여 대규모 데이터의 확장 가능하고 장애 내성 있는 처리를 가능하게 한다.
- 외부 및 분산 환경에서의 CPU 및 I/O 병목 현상을 줄이기 위해 메모리 액세스 패턴과 데이터 레이아웃을 최적화한다.
- 병렬 처리, 캐시 인지 데이터 구조, I/O 효율적인 알고리즘을 조합한 하이브리드 접근 방식을 통해 정렬 처리량을 향상시킨다.
- Thrill의 데이터플로우 모델을 활용해 복잡한 서피크스 정렬 파이프라인을 표현하고 자동 로드 밸런싱 및 장애 내성 기능을 제공한다.
실험 결과
연구 질문
- RQ1공유 메모리 다중 코어 시스템에서 스트링 정렬을 어떻게 효율적으로 병렬화할 수 있을까? 이를 통해 고처리량과 저지연을 달성할 수 있는가?
- RQ2유도 정렬을 외부 메모리에 적합하게 적용할 경우, I/O 연산을 최소화하면서도 선형 확장성을 유지하는 최적의 방법은 무엇인가?
- RQ3Thrill과 같은 분산 대규모 데이터 처리 프레임워크를 활용해 테라바이트 규모의 데이터셋에 대해 확장 가능한 서피크스 정렬을 효과적으로 구현할 수 있는가?
- RQ4제안된 알고리즘이 기존 최첨단 스트링 및 서피크스 정렬 방법과 비교해 실질적으로 어떻게 성능을 발휘하는가?
- RQ5대규모 서피크스 정렬에서 주요 성능 병목 현상은 무엇이며, 알고리즘적 및 시스템 수준 최적화를 통해 이를 어떻게 완화할 수 있는가?
주요 결과
- 64개 코어까지의 병렬 스트링 정렬 구현은 근사 선형 속도 향상을 달성하여 현대 다중 코어 시스템에서 강력한 확장성을 입증한다.
- 유도 정렬 기반의 외부 메모리 서피크스 정렬 알고리즘은 이전 방법 대비 최대 40%까지 I/O 연산을 감소시켜 대규모 데이터셋에서 성능 향상을 크게 개선한다.
- Thrill 기반의 분산 서피크스 정렬 프레임워크는 복수의 노드를 통해 효과적으로 확장되며, 테라바이트 크기의 입력 데이터에서 클러스터 배포 시 선형 속도 향상을 달성한다.
- 캐시 인지 데이터 구조와 I/O 최적화 알고리즘의 조합은 대규모 워크로드에서 표준 구현 대비 2~3배 성능 향상을 이룬다.
- 16개 노드 클러스터를 사용해 1TB 데이터셋에 대해 종단 간 서피크스 배열 구축을 10분 이내에 완료하여 실세계 응용 프로그램에 대한 실현 가능성을 입증한다.
- 프레임워크는 장애 내성과 동적 로드 밸런싱을 지원하여 대규모 텍스트 처리 파이프라인의 프로덕션 환경 구현에 적합하다.
더 나은 연구,지금 바로 시작하세요
논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.
카드 등록 없음 · 무료 플랜 제공
이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.