armon / bloomd

C network daemon for bloom filters
http://armon.github.io/bloomd
Other
1.24k stars 112 forks source link

in_memory = 0 #47

Closed km3945 closed 7 years ago

km3945 commented 7 years ago

Created in_memory = 0 Why is shown in the info or 1

create test capacity=10001 prob=0.01 in_memory=0
Array
(
    [capacity] => 10001
    [checks] => 0
    [check_hits] => 0
    [check_misses] => 0
    [in_memory] => 1
    [page_ins] => 0
    [page_outs] => 0
    [probability] => 0.010000
    [sets] => 0
    [set_hits] => 0
    [set_misses] => 0
    [size] => 0
    [storage] => 18486
)

bloomd.conf

[bloomd]
port = 8673
udp_port = 8674
scale_size = 4
flush_interval = 60
cold_interval = 3600
in_memory = 0
use_mmap = 0
workers = 1
initial_capacity = 100000
default_probability = 1e-4
probability_reduction = 0.9
data_dir = /var/lib/bloomd
log_level = INFO
armon commented 7 years ago

@km3945 The in_memory configuration prevents paging to disk when set to 1. It forces filters to never leave memory. If the setting is set to 0, then bloomd will page it to disk when needed, meaning it is allowed to be out of memory. In this case, you are creating a filter and it starts in memory, which cannot be disabled.