summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Klishin <michael@clojurewerkz.org>2017-12-07 20:17:48 -0800
committerMichael Klishin <michael@clojurewerkz.org>2017-12-07 20:17:48 -0800
commit314f68b56fb93333e392c5e49b0745f5a83f03ad (patch)
tree7a22bb04dcaeefffe01db3da3f170beaac172c49
parentcbb34bbc93b8353a30739cc5f04a5cda20b727f6 (diff)
downloadrabbitmq-server-git-314f68b56fb93333e392c5e49b0745f5a83f03ad.tar.gz
Add config schema entry for total_memory_available_override_value
Closes #1445. [#153501620]
-rw-r--r--docs/rabbitmq.conf.example4
-rw-r--r--priv/schema/rabbit.schema5
-rw-r--r--test/config_schema_SUITE_data/rabbit.snippets8
3 files changed, 17 insertions, 0 deletions
diff --git a/docs/rabbitmq.conf.example b/docs/rabbitmq.conf.example
index e6d1849e47..3722664823 100644
--- a/docs/rabbitmq.conf.example
+++ b/docs/rabbitmq.conf.example
@@ -295,6 +295,10 @@
##
# memory_monitor_interval = 2500
+## The total memory available can be calculated from the OS resources
+## - default option - or provided as a configuration parameter.
+# total_memory_available_override_value = 2GB
+
## Set disk free limit (in bytes). Once free disk space reaches this
## lower bound, a disk alarm will be set - see the documentation
## listed above for more details.
diff --git a/priv/schema/rabbit.schema b/priv/schema/rabbit.schema
index 9a0d54a2ad..740eede99f 100644
--- a/priv/schema/rabbit.schema
+++ b/priv/schema/rabbit.schema
@@ -713,6 +713,11 @@ end}.
{mapping, "vm_memory_calculation_strategy", "rabbit.vm_memory_calculation_strategy",
[{datatype, {enum, [rss, erlang, allocated, legacy]}}]}.
+%% The total memory available can be calculated from the OS resources
+%% (default option) or provided as a configuration parameter
+{mapping, "total_memory_available_override_value", "rabbit.total_memory_available_override_value", [
+ {datatype, [integer, string]}]}.
+
%% Set disk free limit (in bytes). Once free disk space reaches this
%% lower bound, a disk alarm will be set - see the documentation
%% listed above for more details.
diff --git a/test/config_schema_SUITE_data/rabbit.snippets b/test/config_schema_SUITE_data/rabbit.snippets
index f978ee0b41..4a6d211631 100644
--- a/test/config_schema_SUITE_data/rabbit.snippets
+++ b/test/config_schema_SUITE_data/rabbit.snippets
@@ -151,6 +151,14 @@ tcp_listen_options.exit_on_close = false",
[{rabbit,
[{vm_memory_calculation_strategy, legacy}]}],
[]},
+ {total_memory_available_override_value,
+ "total_memory_available_override_value = 1000000000",
+ [{rabbit,[{total_memory_available_override_value, 1000000000}]}],
+ []},
+ {total_memory_available_override_value_units,
+ "total_memory_available_override_value = 1024MB",
+ [{rabbit,[{total_memory_available_override_value, "1024MB"}]}],
+ []},
{connection_max,
"connection_max = 999",
[{rabbit,[{connection_max, 999}]}],