Skip to content

perf: parallel create/update bloomfilter - #6561

Closed
wojiaodoubao wants to merge 2 commits into
lance-format:mainfrom
wojiaodoubao:zone-index-parallel
Closed

wojiaodoubao wants to merge 2 commits into
lance-format:mainfrom
wojiaodoubao:zone-index-parallel

Conversation

@wojiaodoubao

Copy link
Copy Markdown
Contributor

Background

When training a Bloom filter on a dataset with 2 billion rows (string type), the task did not complete even after 3 hours.


Analysis

Lance currently supports two types of zone-based indexes:

  • Bloom Filter
  • ZoneMap

Their performance characteristics differ significantly:

  • Bloom Filter training

    • CPU-intensive
    • Can benefit from parallelism
  • ZoneMap construction

    • Not CPU-intensive
    • Bottleneck lies in I/O and memory bandwidth
    • Parallelism does not provide noticeable speedup

Experiments

1. Bloom Filter Training (Double, 20M rows, object storage)

We evaluated the impact of parallelism on Bloom filter training.

Parallelism Time (s)
1 20.788
2 12.165
5 7.616
10 6.295

2. ZoneMap Index (Int, 200M rows)

We evaluated ZoneMap performance under different parallelism levels.

Parallelism Time (s)
1 25
2 25
10 25

Proposed Changes

Update zoned.rs to introduce parallel execution support:

  • Add:

    • train_parallel
    • rebuild_zones_parallel
  • Rename existing methods:

    • train → train_serial
    • rebuild_zones → rebuild_zones_serial

Usage

  • Bloom Filter → use *_parallel
  • ZoneMap → use *_serial

@wojiaodoubao
wojiaodoubao marked this pull request as draft April 17, 2026 14:51
@github-actions github-actions Bot added the bug Something isn't working label Apr 17, 2026
@wojiaodoubao wojiaodoubao changed the title fix: handle bloomfilter index overflow by multi-batch read&write perf: parallel create/update bloomfilter Apr 17, 2026
@codecov

codecov Bot commented Apr 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.78352% with 88 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rust/lance-index/src/scalar/zoned.rs 85.60% 37 Missing and 22 partials ⚠️
rust/lance-index/src/scalar/bloomfilter.rs 86.63% 15 Missing and 12 partials ⚠️
rust/lance-index/src/scalar/zonemap.rs 71.42% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution. This PR has been inactive for a while, so we're closing it to free up bandwidth. Feel free to reopen it if you still find it useful.

@github-actions github-actions Bot closed this Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working performance Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant