Parsing Streams of JSON Documents at Over a Hundred Gigabytes per Second on CPUs
Abstract
Large volumes of data are shipped as streams of JSON documents, one per line,
and ingesting them is often a bottleneck for analytics. We present a parallel
parser for such streams: workers claim byte ranges from one atomic counter and
snap them to delimiters that cannot occur inside a value, so a document is
never split and no lock is taken on the hot path. Because the parser is
on-demand, it materializes only the fields a query names, which fuses query
evaluation into the parse. We evaluate the design on five Intel and AMD servers
against Pison, a state-of-the-art structural-index parser, and against the
tree-building parsers in common use, verifying identical results throughout.
With dynamic assignment the best rate per machine ranges from 105 to
229 GiB/s (up to 246 GiB/s with static assignment), several times the
throughput that graphics processing unit (GPU) parsers report on the same
datasets. Against Pison we are 4.3–17.0$\times$ faster end to end, because its
index requires a padded copy that its published timings exclude. Against
yyjson, the fastest tree-building parser, we retire fewer instructions per byte
on every dataset. We also compare with three data systems—Apache Arrow,
DuckDB and Polars—and with cuJSON on its own end-to-end workload. Our parser
and benchmark are open source.
Type
Publication
The VLDB Journal
Submitted version, under review at The VLDB Journal.

Authors
Postdoctoral Researcher in Computer Science
I am currently a postdoctoral researcher in computer science at Université
TÉLUQ, where my research focuses on speeding up the conversion of integer and
floating-point numbers into decimal strings. During my doctoral studies, I
designed algorithms and data structures that leverage modern computer
architectures to solve large instances of Markov decision processes (MDPs). In
my master’s research, I developed routing algorithms for electric vehicles
aimed at determining the optimal path between two points while minimizing
travel time (including driving, charging, and expected waiting time at
charging stations).