You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2020/03/17 22:16:54 UTC
[couchdb] branch improved-smoosh-defaults created (now 8586b01)
This is an automated email from the ASF dual-hosted git repository.
wohali pushed a change to branch improved-smoosh-defaults
in repository https://gitbox.apache.org/repos/asf/couchdb.git.
at 8586b01 Update smoosh defaults, default.ini
This branch includes the following new commits:
new 8586b01 Update smoosh defaults, default.ini
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[couchdb] 01/01: Update smoosh defaults, default.ini
Posted by wo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wohali pushed a commit to branch improved-smoosh-defaults
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 8586b01d6823ad227ef7eefe76433e156f83a336
Author: Joan Touzet <jo...@atypical.net>
AuthorDate: Tue Mar 17 18:16:34 2020 -0400
Update smoosh defaults, default.ini
---
rel/overlay/etc/default.ini | 28 +++++++++++++++++++++++-----
src/smoosh/src/smoosh_server.erl | 6 +++---
2 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/rel/overlay/etc/default.ini b/rel/overlay/etc/default.ini
index 246c173..d64b88f 100644
--- a/rel/overlay/etc/default.ini
+++ b/rel/overlay/etc/default.ini
@@ -523,11 +523,29 @@ writer = stderr
; Stats collection interval in seconds. Default 10 seconds.
;interval = 10
-[smoosh.ratio_dbs]
-min_priority = 2.0
-
-[smoosh.ratio_views]
-min_priority = 2.0
+[smoosh]
+;
+; More documentation on these is in the Automatic Compaction
+; section of the documentation.
+;
+;db_channels = upgrade_dbs,ratio_dbs,slack_dbs
+;view_channels = upgrade_views,ratio_views,slack_views
+;
+;[smoosh.ratio_dbs]
+;priority = ratio
+;min_priority = 2.0
+;
+;[smoosh.ratio_views]
+;priority = ratio
+;min_priority = 2.0
+;
+;[smoosh.slack_dbs]
+;priority = slack
+;min_priority = 16777216
+;
+;[smoosh.slack_views]
+;priority = slack
+;min_priority = 16777216
[ioq]
; The maximum number of concurrent in-flight IO requests that
diff --git a/src/smoosh/src/smoosh_server.erl b/src/smoosh/src/smoosh_server.erl
index f9c5210..187c257 100644
--- a/src/smoosh/src/smoosh_server.erl
+++ b/src/smoosh/src/smoosh_server.erl
@@ -364,7 +364,7 @@ get_priority(Channel, DiskSize, DataSize, NeedsUpgrade) ->
Priority = get_priority(Channel),
MinSize = to_number(Channel, "min_size", "1048576"),
MaxSize = to_number(Channel, "max_size", "infinity"),
- DefaultMinPriority = case Priority of "slack" -> "16777216"; _ -> "5.0" end,
+ DefaultMinPriority = case Priority of "slack" -> "16777216"; _ -> "2.0" end,
MinPriority = to_number(Channel, "min_priority", DefaultMinPriority),
MaxPriority = to_number(Channel, "max_priority", "infinity"),
if Priority =:= "upgrade", NeedsUpgrade ->
@@ -541,9 +541,9 @@ t_no_data_view({ok, Shard, GroupId}) ->
meck:expect(couch_index, get_info, fun(_) ->
{ok, [{sizes, {[{file, 5242880}, {active, 0}]}}]}
end),
- ?assertEqual(5.0, get_priority("ratio_views", {Shard, GroupId})),
+ ?assertEqual(2.0, get_priority("ratio_views", {Shard, GroupId})),
?assertEqual(16777216, get_priority("slack_views", {Shard, GroupId})),
- ?assertEqual(5.0, get_priority("upgrade_views", {Shard, GroupId}))
+ ?assertEqual(2.0, get_priority("upgrade_views", {Shard, GroupId}))
end).
t_below_min_priority_view({ok, Shard, GroupId}) ->