diff --git a/docs/config.md b/docs/config.md index e89a8fc9f..211f69a12 100644 --- a/docs/config.md +++ b/docs/config.md @@ -141,8 +141,13 @@ A boolean value. If set to true, all block reads from disk will be hashed and verified. This will cause increased CPU utilization. - `BloomFilterSize` -A number representing the size in bytes of the blockstore's bloom filter. A -value of zero represents the feature being disabled. +A number representing the size in bytes of the blockstore's [bloom filter](https://en.wikipedia.org/wiki/Bloom_filter). A value of zero represents the feature being disabled. + +This site generates useful graphs for various bloom filter values: +You may use it to find a preferred optimal value, where `m` is `BloomFilterSize` in bits. Remember to convert the value `m` from bits, into bytes for use as `BloomFilterSize` in the config file. +For example, for 1,000,000 blocks, expecting a 1% false positive rate, you'd end up with a filter size of 9592955 bits, so for `BloomFilterSize` we'd want to use 1199120 bytes. +[Currently](https://github.com/ipfs/go-ipfs/blob/9c194aa7e2febeab0cbd895067d7d90d82b137f9/blocks/blockstore/caching.go), 7 hash functions are used by default, so the constant `k` is 7 in the formula. + Default: `0`