milvus/internal/querynodev2/pkoracle
wei liu d3e94f9861
enhance: Use Blocked Bloom Filter instead of basic bloom fitler impl (#34377)
issue: #32995
pr: #33405
To speed up the construction and querying of Bloom filters, we chose a
blocked Bloom filter instead of a basic Bloom filter implementation.

WARN: This PR is compatible with old version bf impl, but if fall back
to old milvus version, it may causes bloom filter deserialize failed.

In single Bloom filter test cases with a capacity of 1,000,000 and a
false positive rate (FPR) of 0.001, the blocked Bloom filter is 5 times
faster than the basic Bloom filter in both querying and construction, at
the cost of a 30% increase in memory usage.

Block BF construct time {"time": "54.128131ms"}
Block BF size {"size": 3021578}
Block BF Test cost {"time": "55.407352ms"}
Basic BF construct time {"time": "210.262183ms"}
Basic BF size {"size": 2396308}
Basic BF Test cost {"time": "192.596229ms"}
In multi Bloom filter test cases with a capacity of 100,000, an FPR of
0.001, and 100 Bloom filters, we reuse the primary key locations for all
Bloom filters to avoid repeated hash computations. As a result, the
blocked Bloom filter is also 5 times faster than the basic Bloom filter
in querying.

Block BF TestLocation cost {"time": "529.97183ms"}
Basic BF TestLocation cost {"time": "3.197430181s"}

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-07-05 17:04:10 +08:00
..
bloom_filter_set_test.go enhance: Use BatchPkExist to reduce bloom filter func call cost (#33752) 2024-06-12 17:45:58 +08:00
bloom_filter_set.go enhance: Use Blocked Bloom Filter instead of basic bloom fitler impl (#34377) 2024-07-05 17:04:10 +08:00
candidate.go fix: [2.4] Check nodeID wildcard when removing pkOracle (#33895) (#34020) 2024-06-21 12:04:00 +08:00
key.go enhance: Use BatchPkExist to reduce bloom filter func call cost (#33752) 2024-06-12 17:45:58 +08:00
OWNERS Fix offline set always nil (#23340) 2023-04-11 14:42:30 +08:00
pk_oracle_test.go enhance: Reuse hash locations during access bloom fitler (#32642) 2024-05-07 06:13:47 -07:00
pk_oracle.go enhance: Execute bloom filter apply in parallel to speed up segment predict (#33793) 2024-06-13 14:14:04 +08:00