223

knor: A NUMA-optimized In-memory, Distributed and Semi-external-memory k-means Library

Abstract

k-means is one of the most influential and utilized machine learning algorithms. Its computation limits the performance and scalability of many statistical analysis and machine learning tasks. We rethink and optimize k-means in terms of modern NUMA architectures to develop a novel parallelization scheme that delays and minimizes synchronization barriers. The k-means NUMA Optimized Routine\textit{k-means NUMA Optimized Routine} (knor\textsf{knor}) library has (i) in-memory (knori\textsf{knori}), (ii) distributed memory (knord\textsf{knord}), and (ii) semi-external memory (knors\textsf{knors}) modules that radically improve the performance of k-means for varying memory and hardware budgets. knori\textsf{knori} boosts performance for single machine datasets by an order of magnitude or more. knors\textsf{knors} improves k-means' scalability on a memory budget using SSDs and a minimalistic triangle inequality pruning algorithm; scaling to billions of points on a single machine, using a fraction of the resources that distributed in-memory systems require. knord\textsf{knord} retains knori\textsf{knori}'s performance characteristics, while scaling in-memory through distributed computation in the cloud. We demonstrate knor\textsf{knor} outperforms distributed commercial products like H2_2O, Turi (formerly Dato, GraphLab) and Spark's MLlib by more than an order of magnitude for datasets of 10710^7 to 10910^9 points.

View on arXiv
Comments on this paper