LogKV: Exploiting Key-Value Stores for Log Processing

Zhao Cao, Shimin Chen, Feifei Li, Min Wang, Xiaoyang Sean WangCIDR 2013

Introduction

As modern IT infrastructures scale, the volume of event logs generated by network devices, servers, and applications has reached petabyte proportions. Organizations face a dual challenge: ingesting data at rates exceeding 100 TB/day while simultaneously supporting diverse query patterns—ranging from rapid interactive troubleshooting to intensive batch analysis for security auditing. Traditional solutions often force a trade-off; MapReduce-based systems excel at batch processing but suffer from high latency, while commercial search tools often lack the flexibility for complex joins and aggregations.

System Architecture

LogKV is a distributed log management system designed to bridge this gap by building upon the scalability of mature Key-Value (KV) stores. The architecture decouples the workload into two specialized layers on each worker node:

  1. IngestKV: This layer serves as a high-throughput buffer. It receives raw logs, parses them into KV pairs, and employs a randomized receiver-based shuffling strategy to distribute data across the cluster, effectively eliminating ingestion "hot spots."
  2. TimeRangeKV: This persistent storage layer organizes data into Time Range Units (TRUs). By using configurable time buckets as primary row keys, LogKV ensures temporal locality. This design allows many complex operations, such as window joins, to be performed locally on a single node, drastically reducing network overhead.
Figure 1: LogKV System Architecture Overview

Key Innovations

Beyond its layered architecture, LogKV introduces several optimizations tailored for log data:

  • Time-Centric Data Layout: By partitioning data by time, the system aligns storage with the most common query patterns in log analysis.
  • Sparse Data Compression: Log data is inherently sparse and schema-less. LogKV utilizes a bitmap-based approach to remove NULL values before applying column-based compression, achieving significantly higher storage efficiency than general-purpose algorithms like Gzip.
  • Load Balancing: The system utilizes greedy mapping algorithms to distribute log sources across worker nodes, ensuring balanced resource utilization even with heterogeneous data streams.

Experimental Evaluation

The researchers evaluated LogKV using real-world website traces and synthesized data to simulate massive ingestion volumes on a cluster of HP ProLiant blade servers.

Performance Results

LogKV demonstrates linear scalability, with a 20-node cluster capable of handling nearly 6 million events per second. The system's most significant advantage appears in query performance. For time-window joins, LogKV outperformed MapReduce on HDFS by 11x and a naive Cassandra implementation by 15x. This performance gain is directly attributable to the TRU-based data layout, which minimizes data shuffling during the query phase.

Figure 3: Latency comparison for join queries across different platforms

Furthermore, the system achieved a 15:1 compression ratio on logs (excluding high-entropy fields), and selection queries maintained sub-second response times across varying levels of selectivity.

Conclusion and Future Work

LogKV proves that leveraging mature KV stores with specialized ingestion and storage layers can meet the demands of petabyte-scale log processing. While the current system relies on manual parsing rules, future iterations aim to incorporate automatic log parsing and further optimize the query processor for the IngestKV layer. These enhancements will continue to push the boundaries of interactive, large-scale log analysis.

Summary updated

BibTeX
@inproceedings{cao2013logkv,
  author = {Zhao Cao and Shimin Chen and Feifei Li and Min Wang and Xiaoyang Sean Wang},
  title = {{LogKV: Exploiting Key-Value Stores for Log Processing}},
  booktitle = {CIDR},
  year = {2013},
}
Figure