Hello Niko_Str
A Couchbase bucket in value-only ejection mode has all of the keys for the bucket in metadata, so the benefits of a bloom filter are minimal for most operations as it’s faster to look in the internal memory structures to check if a key exists or not. That said, bloom filters are used in value eviction to improve detection of deleted keys as these are not resident in memory but their tombstones do reside on disk.
Bloom filter do still exist in the latest Couchbase Server versions, upto and including Couchbase Server 7.0.
For example, on my 6.5.1 cluster, I have a value-only bucket called travel-sample. I can see the bloom filter information by using the cbstats
CLI command.
:~$ /opt/couchbase/bin/cbstats -u Administrator -p password -b travel-sample localhost:11210 all | grep bfilter
ep_bfilter_enabled: true
ep_bfilter_fp_prob: 0.01
ep_bfilter_key_count: 10000
ep_bfilter_residency_threshold: 0.1
There’s 2 configuration options for bloom filters that are modified with the cbepctl
command:
bfilter_enabled - Enable or disable bloom filters (true/false)
bfilter_residency_threshold - Resident ratio threshold below which all items will be considered in the bloom filters in full
For example;
:~$ /opt/couchbase/bin/cbepctl localhost:11210 -b travel-sample -u Administrator -p password set flush_param bfilter_enabled false
setting param: bfilter_enabled false
set bfilter_enabled to false
You can see it’s now disabled.
:~$ /opt/couchbase/bin/cbstats -u Administrator -p password -b travel-sample localhost:11210 all | grep bfilter
ep_bfilter_enabled: false
ep_bfilter_fp_prob: 0.01
ep_bfilter_key_count: 10000
ep_bfilter_residency_threshold: 0.1
eviction policy (0.0 - 1.0)
Thank you,
Ian McCloy (Principal Product Manager, Couchbase)