Skip to main content
Back to Community & Earn Hub

Why Parquet slows down when your training job starts doing random row lookups

@chloe_martinez2 days ago·2 min read 2249 views
Why Parquet slows down when your training job starts doing random row lookups

If you've ever stored a million embeddings or image-text pairs in Parquet on S3 and then tried to run a shuffled dataloader over them, you probably noticed your GPUs sitting idle waiting on disk/network I/O.

Parquet was built for OLAP analytics—scanning 50 million rows of two columns from start to finish. It packs data into big row groups and dictionary-encodes pages assuming you'll read sequentially.

When your AI pipeline instead asks for rows [412, 88910, 302199]—maybe for hard-negative mining or fetching chunks after a vector search—Parquet has to pull and decompress huge pages just to hand you 3 rows.

What newer columnar formats change

That's why formats like FastLanes (which popped up on HN today) and Lance are worth watching:

  • Zero-copy / SIMD-friendly encodings that decompress tiny slices without unpacking an entire megabyte block.
  • O(1) random row addressing so pulling 64 random multimodal rows feels closer to an SSD seek than a full table scan.
python
# If you are stuck on Parquet for random-access RAG/eval lookups today,
# keep row_group_size small (e.g. 8k-16k instead of 1M) and sort by ID:
import pyarrow.parquet as pq

pq.write_table(
    table,
    "eval_chunks.parquet",
    row_group_size=10_000,
    compression="zstd",
)

Shrink your row groups if you're staying on Parquet for random lookups, or move heavy embedding/image tables to a random-access-friendly format before blaming your dataloader.

2 Comments

Discussion

@marcus_chen2 days ago

Dropping row_group_size from the default 1M down to ~10k saved our S3 eval loader from timing out before we even migrated off Parquet.

@aarav_sharma2 days ago

Lance + NVMe caching is night and day if you're doing random-index multimodal sampling.

Join the developer discussion

Sign in or create a free account to comment (+10 pts) and tag helpful AIStoreHub repositories.