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

Mas i370 patch e #385

Merged
merged 38 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
d393c99
Refactor penciller memory
martinsumner Nov 3, 2022
415e682
Compress SST index
martinsumner Nov 9, 2022
e139877
Immediate hibernate
martinsumner Nov 9, 2022
56c5e25
Refactor BIC
martinsumner Nov 10, 2022
8370acc
Use correct size in test results
martinsumner Nov 10, 2022
3332cb7
Don't change summary record
martinsumner Nov 12, 2022
a968ea5
Clerk to prompt L0 write
martinsumner Nov 13, 2022
3315dc1
Add push on journal compact
martinsumner Nov 14, 2022
6aea434
Extend tests
martinsumner Nov 15, 2022
1cf687c
Fix range keys smaller than prefix
martinsumner Nov 15, 2022
a725fec
Tidy-up
martinsumner Nov 16, 2022
ee93761
Tidy-up
martinsumner Nov 16, 2022
aa353fa
Tidy up
martinsumner Nov 16, 2022
7d97e98
Remove R16 relic
martinsumner Nov 16, 2022
499b0cb
Further testing another issue
martinsumner Nov 17, 2022
0f5db75
Fix unit test
martinsumner Nov 17, 2022
2b5f7bc
Code and spec tidy
martinsumner Nov 17, 2022
7236a31
Hibernate on BIC complete
martinsumner Nov 17, 2022
1578ee3
Test all index keys have same term
martinsumner Nov 20, 2022
9db4866
Summaries with same index term
martinsumner Nov 22, 2022
76ed44d
Simplify case statements
martinsumner Nov 23, 2022
0fe735f
OK for M == N
martinsumner Nov 23, 2022
8e2dc41
Simplify
martinsumner Nov 23, 2022
e6490d5
Add test for head_only mode
martinsumner Nov 24, 2022
df271f0
Revert previous change - must support typed buckets
martinsumner Nov 24, 2022
2f745d5
Minimise LoopState mutation on read
martinsumner Nov 30, 2022
54af7cc
Make configurable
martinsumner Nov 30, 2022
4aaecf4
Close in loop
martinsumner Dec 1, 2022
c8b426b
Revert "Close in loop"
martinsumner Dec 1, 2022
a7a8239
Refactor leveled_log
martinsumner Dec 2, 2022
eaa36cc
Efficient time format
martinsumner Dec 2, 2022
6967d3e
Minor tidy
martinsumner Dec 2, 2022
228db26
Add dialyzer specs
martinsumner Dec 2, 2022
afb90cf
Merge branch 'develop-3.0' into mas-i370-patchE
martinsumner Dec 5, 2022
e7f38f5
Name config options correctly
martinsumner Dec 6, 2022
9fd4987
Add missing specs, and extra test
martinsumner Dec 12, 2022
0ec6be8
Clarify monitoring logs
martinsumner Dec 15, 2022
fc015f3
Clarify module comment
martinsumner Dec 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/STARTUP_OPTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,9 @@ There are two snapshot timeouts that can be configured:
These set the period in seconds before a snapshot which has not shutdown, is declared to have been released - so that any file deletions which are awaiting the snapshot's completion can go ahead.

This covers only silently failing snapshots. Snapshots that shutdown neatly will be released from locking deleted files when they shutdown. The 'short' timeout is used for snapshots which support index queries and bucket listing. The 'long' timeout is used for all other folds (e.g. key lists, head folds and object folds).

## Statistic gathering

Leveled will gather monitoring statistics on HEAD/GET/PUT requests, with timing points taken throughout the store. These timings are gathered by the `leveled_monitor`, and there are three configuration options. The two primary options are: `stats_percentage` is an integer between 0 and 100 which informs the store of the proprtion of the requests which should be timed at each part; and `stats_logfrequency` which controls the frequency (in seconds) with which the leveled_monitor will write a log file (for one of the stats types in its queue).

The specific stats types logged can be found in the ?LOG_LIST within the leveled_monitor. If a subset only is of interest, than this list can be modified by setting `monitor_loglist`. This can also be used to repeat the frequency of individual log types by adding them to the list multiple times.
12 changes: 8 additions & 4 deletions include/leveled.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,17 @@
binary_mode = false :: boolean(),
sync_strategy = sync,
log_options = leveled_log:get_opts()
:: leveled_log:log_options()}).
:: leveled_log:log_options(),
monitor = {no_monitor, 0} :: leveled_monitor:monitor()}).

-record(sst_options,
{press_method = native
:: leveled_sst:press_method(),
log_options = leveled_log:get_opts()
:: leveled_log:log_options(),
max_sstslots = 256 :: pos_integer(),
pagecache_level = 1 :: pos_integer()}).
pagecache_level = 1 :: pos_integer(),
monitor = {no_monitor, 0} :: leveled_monitor:monitor()}).

-record(inker_options,
{cdb_max_size :: integer() | undefined,
Expand All @@ -73,7 +75,8 @@
singlefile_compactionperc :: float()|undefined,
maxrunlength_compactionperc :: float()|undefined,
score_onein = 1 :: pos_integer(),
snaptimeout_long :: pos_integer() | undefined}).
snaptimeout_long :: pos_integer() | undefined,
monitor = {no_monitor, 0} :: leveled_monitor:monitor()}).

-record(penciller_options,
{root_path :: string() | undefined,
Expand All @@ -88,7 +91,8 @@
compression_method = native :: lz4|native,
levelzero_cointoss = false :: boolean(),
snaptimeout_short :: pos_integer() | undefined,
snaptimeout_long :: pos_integer() | undefined}).
snaptimeout_long :: pos_integer() | undefined,
monitor = {no_monitor, 0} :: leveled_monitor:monitor()}).

-record(iclerk_options,
{inker :: pid() | undefined,
Expand Down
19 changes: 16 additions & 3 deletions priv/leveled.schema
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,20 @@
hidden
]}.

%% @doc Statistic monitoring proportion
%% The proportion of requests to be convered by stats, an integer between
%% 0 and 100. There is no flow control, so setting this too high could
%% possibly overflow the leveled_monitor mailbox.
{mapping, "leveled.stats_percentage", "leveled.stats_percentage", [
{default, 10},
{datatype, integer},
{validators, ["range:0-100"]}
]}.




%% @doc Statistic log frequency (seconds)
%% The wait in seconds between logs from each leveled_monitor (there is one
%% monitor per vnode)
{mapping, "leveled.stats_logfrequency", "leveled.stats_logfrequency", [
{default, 30},
{datatype, integer}
]}.
18 changes: 18 additions & 0 deletions priv/leveled_multi.schema
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,25 @@
hidden
]}.

%% @doc Statistic monitoring proportion
%% The proportion of requests to be convered by stats, an integer between
%% 0 and 100. There is no flow control, so setting this too high could
%% possibly overflow the leveled_monitor mailbox.
{mapping, "multi_backend.$name.leveled.stats_percentage", "riak_kv.multi_backend", [
{default, 10},
{datatype, integer},
{validators, ["range:0-100"]},
hidden
]}.

%% @doc Statistic log frequency (seconds)
%% The wait in seconds between logs from each leveled_monitor (there is one
%% monitor per vnode)
{mapping, "multi_backend.$name.leveled.stats_logfrequency", "riak_kv.multi_backend", [
{default, 30},
{datatype, integer},
hidden
]}.



Loading