Oriel — AI & technology worth noticing, every day.

One Hash Bloom Filters

Web page · https://calabro.io/ohbf

First seen by Oriel on .

AI summary

Jim Calabro describes one-hash Bloom filters and the Go implementation gloom, which uses a single 128-bit hash to derive filter positions and has run in Bluesky’s backend for nine months.

  • One-hash Bloom filters divide storage into pairwise-coprime partitions and use one hash value modulo each partition size to obtain the bit positions.
  • gloom uses xxh3.Hash128, cache-line-sized 64-byte blocks, aligned memory, and multiplication-based block selection to reduce lookup costs.
  • Its ShardedAtomicFilter spreads writes across backing filter shards to reduce contention between CPU cores.
  • Bluesky’s earlier mutex contention slowed a full deploy to 90 minutes; atomic-bloom reduced that to about 15 minutes, while one-hash filtering itself brought no noticeable further speedup for Bluesky’s workload.
  • gloom is also used in jetstream, and its example configures an atomic filter for one million items with an approximate 1% false positive rate.

#bloom filters #go #xxh3 #concurrency

Generated by gpt-5.6-sol. Check the original for details.

Aliases

SourceExternal IDURL
Hacker News50157865https://calabro.io/ohbf Read discussion