Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Default memory high watermark to 1.0 when using a higher value #213

Merged
merged 3 commits into from Jul 11, 2017

Conversation

gerhard
Copy link
Contributor

@gerhard gerhard commented Jul 10, 2017

Prior to this change, setting the vm_memory_high_watermark to a value
higher than 1 (inclusive), would default to 0.4. This is different from
the behaviour when setting an absolute value, which defaults to the
total memory available.

Extracted common memory-related macros so that they can be
shared by tests.

re rabbitmq/rabbitmq-server#1285

[finishes #148470947]

Prior to this change, setting the vm_memory_high_watermark to a value
higher than 1 (inclusive), would default to 0.4. This is different from
the behaviour when setting an absolute value, namely defaulting to the
total memory available.

Extracted common memory-related macros & records so that they can be
shared by tests.

re rabbitmq/rabbitmq-server#1285

[finishes #148470947]
-define(DEFAULT_VM_MEMORY_HIGH_WATERMARK, 0.4).
-define(MAX_VM_MEMORY_HIGH_WATERMARK, 1.0).

-record(state, {total_memory,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid state is overly generic for a record in a shared header. Please rename this to vm_mem_monitor_state or vm_memory_state?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, since this record is only used in one module, we can move it to vm_memory_monitor.

@michaelklishin michaelklishin merged commit ed4c07c into stable Jul 11, 2017
@gerhard gerhard deleted the rabbitmq-server-1285 branch July 11, 2017 05:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants