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

It is possible cache the bloom filter to NVMe? (support filters larger than 2^38 bytes) #4

Open
hskun opened this issue Nov 14, 2021 · 4 comments

Comments

@hskun
Copy link

hskun commented Nov 14, 2021

libfilter is very fast.
I have about 2^36 items to add in bf, it is possible cache the bloom filter to NVMe?

@jbapple
Copy link
Owner

jbapple commented Nov 14, 2021

You could use mmap in the C interface to allocate a libfilter_region's block pointer, I suppose. If you just accessed the NVMe space needed on each read or write, I suppose the OS might cache it anyway.

Thoughts?

@hskun
Copy link
Author

hskun commented Nov 14, 2021

You could use mmap in the C interface to allocate a libfilter_region's block pointer, I suppose. If you just accessed the NVMe space needed on each read or write, I suppose the OS might cache it anyway.

Thoughts?

I will have a try.
Thank you!

@jbapple
Copy link
Owner

jbapple commented Nov 15, 2021

Looking more carefully at the code, I don't think it supports filters larger than 2^32 bytes. I'll take this as a feature request.

@jbapple jbapple changed the title It is possible cache the bloom filter to NVMe? It is possible cache the bloom filter to NVMe? (support filters larger than 2^32 bytes) Nov 15, 2021
@jbapple
Copy link
Owner

jbapple commented Jan 8, 2022

When I run the following, the correct amount of memory is allocated on my machine:

BlockFilter::CreateWithNdvFpp(1ul << 34, 0.0001)

How much memory is allocated on your machine if you just call this factory method and then return from main? What tool are you using to measure the amount of memory allocated?

@jbapple jbapple changed the title It is possible cache the bloom filter to NVMe? (support filters larger than 2^32 bytes) It is possible cache the bloom filter to NVMe? (support filters larger than 2^38 bytes) Jan 8, 2022
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