Skip to content

Commit b41ca16

Browse files
committed
Add additional vm_memory_calculation_strategy values to cuttlefish conf
Requires rabbitmq/rabbitmq-common#224
1 parent 1d23411 commit b41ca16

File tree

4 files changed

+16
-26
lines changed

4 files changed

+16
-26
lines changed

docs/rabbitmq.conf.example

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,10 @@
267267
##
268268
# vm_memory_high_watermark_paging_ratio = 0.5
269269

270-
## Selects Erlang VM memory consumption calculation strategy. Can be `rss` or `erlang`,
271-
## `rss` is the default. Introduced in 3.6.11.
272-
## See https://github.com/rabbitmq/rabbitmq-server/issues/1223 for background.
273-
# vm_memory_calculation_strategy = rss
270+
## Selects Erlang VM memory consumption calculation strategy. Can be `allocated`, `rss` or `legacy` (aliased as `erlang`),
271+
## Introduced in 3.6.11. `allocated` is the default as of 3.6.13.
272+
## See https://github.com/rabbitmq/rabbitmq-server/issues/1223 and rabbitmq/rabbitmq-common#224 for background.
273+
# vm_memory_calculation_strategy = allocated
274274

275275
## Interval (in milliseconds) at which we perform the check of the memory
276276
## levels against the watermarks.

priv/schema/rabbit.schema

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -686,13 +686,13 @@ end}.
686686
{mapping, "memory_monitor_interval", "rabbit.memory_monitor_interval",
687687
[{datatype, integer}]}.
688688

689-
%% When set to rss, RabbitMQ will display the memory usage as reported
690-
%% by the operating system (RSS value), not by the Erlang VM.
689+
%% Selects Erlang VM memory consumption calculation strategy.
690+
%% Can be `allocated`, `rss` or `legacy` (aliased as `erlang`).
691691
%%
692-
%% {vm_memory_calculation_strategy, rss},
692+
%% {vm_memory_calculation_strategy, allocated},
693693

694694
{mapping, "vm_memory_calculation_strategy", "rabbit.vm_memory_calculation_strategy",
695-
[{datatype, {enum, [rss, erlang]}}]}.
695+
[{datatype, {enum, [rss, erlang, allocated, legacy]}}]}.
696696

697697
%% Set disk free limit (in bytes). Once free disk space reaches this
698698
%% lower bound, a disk alarm will be set - see the documentation

src/rabbit_looking_glass.erl

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,30 +27,12 @@ boot() ->
2727
ok;
2828
Value ->
2929
Input = parse_value(Value),
30-
<<<<<<< HEAD
3130
rabbit_log:info("Enabling Looking Glass profiler, input value: ~p", [Input]),
3231
{ok, _} = application:ensure_all_started(looking_glass),
3332
lg:trace(Input, lg_file_tracer, "traces.lz4", #{
3433
mode => profile,
3534
running => true,
3635
send => true})
37-
=======
38-
rabbit_log:info(
39-
"Enabling Looking Glass profiler, input value: ~p",
40-
[Input]
41-
),
42-
{ok, _} = application:ensure_all_started(looking_glass),
43-
lg:trace(
44-
Input,
45-
lg_file_tracer,
46-
"traces.lz4",
47-
maps:from_list([
48-
{mode, profile},
49-
{running, true},
50-
{send, true}]
51-
)
52-
)
53-
>>>>>>> stable
5436
end.
5537

5638
parse_value(Value) ->

test/config_schema_SUITE_data/rabbit.snippets

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,14 @@ tcp_listen_options.exit_on_close = false",
143143
[{rabbit,
144144
[{vm_memory_calculation_strategy, erlang}]}],
145145
[]},
146+
{vm_memory_calculation_strategy, "vm_memory_calculation_strategy = allocated",
147+
[{rabbit,
148+
[{vm_memory_calculation_strategy, allocated}]}],
149+
[]},
150+
{vm_memory_calculation_strategy, "vm_memory_calculation_strategy = legacy",
151+
[{rabbit,
152+
[{vm_memory_calculation_strategy, legacy}]}],
153+
[]},
146154
{listeners_tcp_ip,
147155
"listeners.tcp.1 = 192.168.1.99:5672",
148156
[{rabbit,[{tcp_listeners,[{"192.168.1.99",5672}]}]}],

0 commit comments

Comments
 (0)