Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to calculate the redis memory usage of CountingBloomFilterRedis #58

Open
techzhou opened this issue Nov 7, 2019 · 1 comment
Open

Comments

@techzhou
Copy link

techzhou commented Nov 7, 2019

For example,

new FilterBuilder(1000000, 1e-5)

when it full (added 1000000 elements)

how much memory it cost. is there any calculation method?

@kangwen
Copy link

kangwen commented Apr 27, 2021

N (added elements , 1000000 eg.)
f (falseProbability, 1e-5 eg.)
M (total bit): M = - N * ln(f) / ln2^2.
K(hash functions): K = max(1, ln2* M/N)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants