sanjay • engineering

Reading Parquet with cuDF

October 17, 2026

Sanjay Yepuri

At Chalk, I’ve been building a distributed query engine whose executor can target both CPUs and GPUs. For an early GPU demo, we compiled queries into cuDF operations and loaded their inputs from Parquet files. This made me wonder: how does cuDF read Parquet, and what controls does it provide for managing GPU memory? After all, the name of the game is keeping the working set as close to compute as possible.

I found a paper discussing exactly my questions. I spent a morning diving deeper and getting my hands dirty.

A Brief Tour of Parquet

Before we talk about cuDF, it's important to understand at a high level how data is laid out in a parquet file. This will enable us to reason about how the encoded/compressed data is loaded from disk and placed in memory, and how the reader decodes the data into units that can be combined to create a desired batch/chunk size.

Aside: confusingly, different libraries use chunk, batch, group, etc. to mean different things. I will try to disambiguate this by treating parquet's terminology as proper nouns.

Parquet files have two sections. They have a metadata footer that is written after all the data. This section contains the information needed to index into the first level of the data hierarchy called Row Groups and Column Chunks. It also could contain statistics and other information to select and prune Row Groups.

The section preceding the footer in the file contains all the data. The logical table represented by a parquet file is divided by rows into a Row Group. This is a horizontal partitioning of the data. Within a Row Group there are Column Chunks for each column in the data. Within a Column Chunk are Pages. These contain the bytes that should be decoded. Once a Column Chunk is loaded into memory, we can start decoding it Page by Page.

Parquet Data Structure
Row Group 1 contains a horizontal slice of the table: the same rows across every column.
Figure 1. Select a level, then a Row Group or Column Chunk.

I highly suggest reading Parquet File Format for a more detailed look.

cuDF's Parquet Reader

For our discussion, we will focus on how the reader manages compressed and decompressed data buffers for fixed-width tables, leaving nulls, nested data structures, and lists for another time.

The core algorithm for decoding parquet is fairly straightforward. The chunked reader groups selected row groups into input passes and loads their encoded column chunks. It then uses page metadata to plan subpasses for decompression and decoding. pass_read_limit influences this batching, but is a soft hint rather than a cap on total GPU memory. A separate control, chunk_read_limit, governs the size of returned output tables.

The GPU parallelism occurs in two main spots:

  • Header kernels walk page headers within each column chunk, collecting information used to plan processing and allocate buffers. In this experiment, they assigned one warp per column chunk.
  • Value-decoding kernels materialize the selected pages into output buffers. In the measured fixed-width decoding path, the launch assigned one block per data page.

Experiments

Now that we know how the parquet reader works at a high level, we can see that the number of Pages and the Page size play a large part in determining performance. We ran two experiments. The first explored the results in Luo's paper regarding Page size. The second experiment held the Page size fixed to see how cuDF's parquet reader configuration led to different numbers of passes and sub-passes.

The experiments were run on an NVIDIA RTX 3090 with 24 GiB of VRAM, using a C++ reader built against libcudf 26.10 on Ubuntu 20.04 under WSL2. Compatibility I/O was enabled; GPUDirect Storage was not used. Read timings included metadata processing, allocation, file access, transfers, and GPU decoding, ending with GPU synchronization. GPU aggregation was timed separately, and every measured sum was checked against a CPU reference. The full experiment report includes reproduction instructions and raw results. Note the repository was generated with GPT-6.1 Sol.

Sweep on Page Sizes

The first experiment was inspired by the paper; we generated a parquet file with the same amount of table data. The parquet was laid out with 4 Row Groups, each with a single Column Chunk. Each Column Chunk had a different number of Pages based on the selected Page size.

Exact page-size measurements
Page targetActual total pagesMedian readObserved min–max
16 KiB4,09624.681 ms23.988–27.926 ms
64 KiB1,02418.541 ms17.627–20.346 ms
256 KiB25617.231 ms15.995–19.096 ms
1 MiB6417.412 ms16.098–19.383 ms
16 MiB426.378 ms25.264–27.823 ms
Exact page-size measurements — 15 GiB rerun
Page targetActual total pagesMedian readObserved min–max
16 KiB983,0409.792 s9.757–9.824 s
64 KiB245,7607.258 s7.241–7.292 s
256 KiB61,4406.746 s6.735–6.855 s
1 MiB15,3606.883 s6.693–6.944 s
16 MiB9606.694 s6.660–6.769 s

We can see that our results empirically agree with Luo's insight that each Column Chunk should have more pages (around 100). In the original experiment, we saw that between 16 and 64 pages per Column Chunk provided the best performance. The paper mentions there is no one value that is optimal.

At this point, I was wondering where time was being spent in the reader. Why did having more pages seem to substantially increase the runtime?

Select a Page size below to compare the header and value-decoding costs, then follow the corresponding recorded read:

Page Size Results
Four Row Groups; original whole-file reads with a warm filesystem cache. Timing and tracing are separate runs.
Page targetUnprofiled read · ms
01632 ms
Kernel Runtime
Page headers0.419 ms
Value decoding0.202 ms
Shared 0–11 ms scale. Separate profiled medians.
64Pages / Column Chunk
256blocks per decoder launch
256 KiB produces 256 data Pages across the file. The trace recorded 1 value-decoder launches and 33 reader kernels. More Pages change the work within each launch; the launch count also reflects batching. This configuration had the lowest median read time in this sweep.
Kernel Launch Timeline256 KiB · first measured profiled iteration
Figure 3. Read bars show unprofiled medians; whiskers show observed min–max. Traces are separate profiled reads, not SM utilization. For 15 GiB, kernel totals cover the full read while the timeline shows only its first output batch. Subpixel events are widened for visibility. The larger experiment changes row-group layout and read API as well as scale; compare Page sizes within a dataset, not absolute latency across the two datasets.
Measurements and trace methodology ↗
Exact profiled kernel measurements
Page targetData-decoder gridHeader kernelsValue decoderKernel busy timeMemcpy busy time
16 KiB4,096 blocks7.119 ms0.189 ms7.513 ms5.807 ms
64 KiB1,024 blocks1.721 ms0.178 ms2.017 ms5.461 ms
256 KiB256 blocks0.419 ms0.202 ms0.716 ms5.504 ms
1 MiB64 blocks0.113 ms0.611 ms0.800 ms5.495 ms
16 MiB4 blocks0.012 ms9.775 ms9.862 ms5.519 ms
Exact profiled kernel measurements — 15 GiB Experiment
Page targetBlocks per decoder launchHeader kernelsValue decoderKernel busy timeMemcpy busy time
16 KiB327683319.630 ms41.416 ms3417.935 ms1328.580 ms
64 KiB8192827.632 ms40.970 ms884.723 ms1262.836 ms
256 KiB2048244.385 ms47.402 ms298.258 ms1248.128 ms
1 MiB51272.530 ms78.121 ms155.591 ms1244.544 ms
16 MiB324.101 ms329.151 ms336.297 ms1241.788 ms

My initial guess was that there was more overhead on the decode side since each page couldn't be scheduled in the same sub-pass. This was wrong, however. We can see that when the Page size was small, more time was spent in the header kernels. This aligns with our understanding that these kernels are parallelized by Column Chunk, but scan the Page headers serially; more headers mean the runtime contribution grows with the number of pages.

In a similar manner, if the Page size is large, we lose parallelism opportunities on the decode side. That's why the 16 MiB page took longer in the original experiment. There were only 4 launched blocks decoding larger Pages of data.

In each original run, the read launched 33 kernels; page size changed the grid and kernel runtime, not the number of launches.

This core takeaway is the same as in Luo's paper: the page size used in parquet plays a large part in the performance of GPU decoding.

Memory Control

In the first experiment, I noticed that my parquet file was being decoded in a single pass and sub-pass. I wanted to see how the number of passes and sub-passes impacted performance. I understood that the additional overhead would increase the runtime, but I wanted to verify that the buffer memory used for reading the parquet was controlled.

This experiment used eight row groups and three integer columns, compressed with ZSTD and written with a 1 MiB page target. The file occupied 251.6 MiB on disk and contained 640 MiB of numeric output. I varied pass_read_limit with the output limit disabled, consuming and releasing each returned table individually.

For the original memory measurements, we ran three additional rounds per configuration after a warm-up. An RMM statistics adaptor tracked live allocations through the current device memory resource, including reader temporaries, output tables, and reduction allocations. The default CUDA allocator was preserved; no memory pool was added.

Memory-Runtime Tradeoff
Pass-memory hint output limit disabled
Pass hintPeak live RMM0–1,900 MiBBaseline read0–7,000 ms
16 MiB
44.05 MiB
6,423.41 ms
64 MiB
94.36 MiB
998.97 ms
256 MiB
259.16 MiB
462.27 ms
512 MiB
510.77 MiB
295.13 ms
Unlimited
1,861.60 MiB
153.10 ms
8input passes
32subpasses
32output tables
At a 64 mib hint, peak live allocations are 94.36 MiB and reads take 6.5× as long as the fastest measured setting (unlimited). The original smaller dataset fits with unlimited hints.
Figure 4. Measured configurations, on shared linear scales within each dataset. Memory was measured separately from timing. Each returned table is consumed and released; the hint is not a cap on total memory. Data & method ↗
Exact pass-hint measurements
Pass hintInput passes / subpassesPeak live RMM allocationsBaseline median read
Unlimited1 / 11,861.60 MiB153.10 ms
16 MiB8 / 24844.05 MiB6,423.41 ms
64 MiB8 / 3294.36 MiB998.97 ms
256 MiB4 / 12259.16 MiB462.27 ms
512 MiB2 / 6510.77 MiB295.13 ms
Exact pass-hint measurements — 15 GiB Experiment
Pass hintInput passes / subpassesPeak live RMM allocationsBaseline median read
256 MiB96 / 288259.17 MiB10.364 s
512 MiB48 / 144510.78 MiB6.646 s
1,024 MiB22 / 641,020.29 MiB4.553 s
2,048 MiB11 / 312,044.34 MiB3.690 s
4,096 MiB5 / 154,096.17 MiB3.437 s
8,192 MiB3 / 88,189.96 MiB3.348 s

The 16 MiB and 64 MiB hints both required eight input passes, but the smaller hint increased subpasses from 32 to 248. It reduced peak live allocations from 94.36 MiB to 44.05 MiB while making reads about 6.4× slower. The hint therefore exposes a substantial memory–latency tradeoff, even when the input-pass count stays unchanged.

Closing Out

cuDF provides controls for trading reader memory against throughput, but those controls are soft hints rather than strict memory caps. In these experiments, we learned page layout affected the balance between header processing and value decoding, while the pass-memory hint affected batching and peak live allocations.

There are still many more details to be explored and a whole experimental parquet reader in the cuDF codebase. That's the next thing to look into. Until next time!