Abstract
Similarity search on massive data series collections is a critical task in numerous scientific and financial domains. While previous state-of-the-art indices were optimized for disk-resident data, the shift toward large-scale in-memory processing reveals new bottlenecks in CPU utilization and memory synchronization. We present MESSI (in-MEmory data SerieS Index), the first data series index specifically engineered for modern multi-core architectures. MESSI leverages SIMD vectorization and a novel multi-queue parallel architecture to achieve up to 11x faster query speeds than existing methods, enabling exact similarity searches on 100GB datasets in approximately 50 milliseconds.
Introduction
Data series—ordered sequences of data points—are ubiquitous. As datasets grow into the terabyte range, performing efficient "similarity searches" (e.g., finding the nearest neighbor to a query sequence) becomes increasingly difficult. Traditional high-performance tools like ParIS+ were designed when disk I/O was the primary bottleneck. In such systems, the latency of reading from a hard drive effectively masks inefficient CPU usage.
However, modern servers often possess enough RAM to hold entire datasets. In this in-memory regime, the bottleneck shifts from I/O to the CPU and memory synchronization. Existing disk-based indices perform poorly in RAM because they are not optimized for parallel processing, Single Instruction Multiple Data (SIMD) capabilities, or multi-socket architectures. MESSI addresses these challenges by rethinking index design for a CPU-bound environment.
The MESSI Architecture
MESSI introduces several key innovations to optimize performance on multi-core hardware:
1. iSAX Summarization and Pruning
MESSI utilizes indexable Symbolic Aggregate approximation (iSAX) to create compact bit-wise summaries of data series. This allows the system to quickly calculate lower-bound distances and prune large portions of the search space without accessing the raw data.
2. Parallel-Friendly Construction and Multi-Queue Querying
To maximize CPU utilization, MESSI employs a "Fetch & Increment" strategy to dynamically distribute data blocks across threads during index construction. For querying, MESSI replaces the traditional single shared priority queue—which causes significant thread contention—with a Multiple-Queue (MQ) architecture. By using a round-robin insertion strategy across multiple queues, MESSI drastically reduces synchronization overhead.
3. SIMD Optimization and Two-Stage Pruning
The system vectorizes the most computationally expensive operations, such as Euclidean and Dynamic Time Warping (DTW) distance calculations, using SIMD instructions. Furthermore, a two-stage pruning process uses tree-based exact searches to eliminate "true negatives" early, minimizing expensive real-distance calculations.
Experimental Evaluation
The performance of MESSI was evaluated using synthetic random walk data (50GB–200GB) and two massive real-world datasets:
- Seismic: 100 million series (100GB) of seismic wave data.
- SALD: 200 million series (100GB) of neuroscience MRI data.
Key Results
- Query Latency: MESSI is the first index to achieve sub-100ms response times on 100GB datasets, typically averaging 50ms. This represents an 11x speedup over previous state-of-the-art competitors.
- Construction Speed: Index building is up to 4x faster than in-memory versions of ParIS+.
- Real-world Impact: In a k-NN classification task involving 100,000 objects, MESSI reduced total processing time from 24 hours to 93 minutes.
Discussion and Conclusion
The development of MESSI highlights the "I/O Masking" fallacy: in disk-based systems, CPU inefficiencies are hidden. In-memory, every clock cycle and lock contention becomes a visible bottleneck. By prioritizing zero-contention local processing over perfect global ordering (via the MQ architecture), MESSI achieves massive throughput.
Future work includes adapting these techniques for binary trees or indices with smaller fanouts and scaling the architecture to distributed frameworks like Apache Spark. MESSI demonstrates that a ground-up rethink of indexing for modern hardware is essential for real-time, interactive data exploration at scale.
Summary updated