/
bitcask.app
73 lines (65 loc) · 2.81 KB
/
bitcask.app
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{application, bitcask,
[
{description, ""},
{vsn, "1.4.0"},
{modules, [
bitcask,
bitcask_app,
bitcask_merge_worker,
bitcask_nifs,
bitcask_lockops,
bitcask_fileops,
bitcask_sup
]},
{registered, []},
{applications, [
kernel,
stdlib
]},
{mod, {bitcask_app, []}},
{env, [
%% Default max file size (in bytes)
{max_file_size, 16#80000000}, % 2GB default
%% Wait time to open a keydir (in seconds)
{open_timeout, 4},
%% Strategies available for syncing data to disk:
%% * none - let the O/S decide
%% * o_sync - use the O_SYNC flag to sync each write
%% * {seconds, N} - call bitcask:sync/1 every N seconds
%%
%% Note that for the {seconds, N} strategy, it is up to the
%% API caller to execute the call on the interval. This config
%% option is (currently) a convenient placeholder for calling
%% applications.
{sync_strategy, none},
%% Merge window. Span of hours during which merge is acceptable.
%% * {Start, End} - Hours during which merging is permitted
%% * always - Merging is always permitted (default)
%% * never - Merging is never permitted
{merge_window, always},
%% Merge trigger variables. Files exceeding ANY of these
%% values will cause bitcask:needs_merge/1 to return true.
%%
{frag_merge_trigger, 60}, % >= 60% fragmentation
{dead_bytes_merge_trigger, 536870912}, % Dead bytes > 512 MB
%% Merge thresholds. Files exceeding ANY of these values
%% will be included in the list of files marked for merging
%% by bitcask:needs_merge/1.
%%
{frag_threshold, 40}, % >= 40% fragmentation
{dead_bytes_threshold, 134217728}, % Dead bytes > 128 MB
{small_file_threshold, 10485760}, % File is < 10 MB
%% Fold keys thresholds. max_fold_age will reuse the keydir if
%% another fold was started less than max_fold_age ago and there
%% were less than max_fold_puts updates. Otherwise it will
%% wait until all current fold keys complete and then start.
%% Set either option to -1 to disable.
{max_fold_age, -1}, % age in micro seconds (unlimited)
{max_fold_puts, 0}, % maximum number of updates
%% Data expiration can be caused by setting this to a
%% Data expiration can be caused by setting this to a
%% positive value. If so, items older than the value
%% will be discarded.
{expiry_secs, -1}
]}
]}.