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

os_mon: Fix use available mem for system_memory_high_watermark alarm #8776

Merged
merged 2 commits into from
Oct 17, 2024

Conversation

mmzeeman
Copy link
Contributor

@mmzeeman mmzeeman commented Sep 3, 2024

Fixes #8759

  • Use available memory (when available) to calculate how much memory a system has used.
  • Add available_memory to memsup:get_system_memory_data/1 result on Apple.

Fixes are for Linux` and Apple.

Copy link
Contributor

github-actions bot commented Sep 3, 2024

CT Test Results

  2 files   15 suites   4m 30s ⏱️
113 tests 110 ✅ 3 💤 0 ❌
133 runs  130 ✅ 3 💤 0 ❌

Results for commit 6a41f5b.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@garazdawi garazdawi self-assigned this Sep 3, 2024
@rickard-green rickard-green added the team:VM Assigned to OTP team VM label Sep 9, 2024
@garazdawi garazdawi added the testing currently being tested, tag is used by OTP internal CI label Sep 20, 2024
@garazdawi
Copy link
Contributor

These changes look good. Do you think the docs need to be updated in order to clarify what is going on?

@mmzeeman
Copy link
Contributor Author

Yes... that sounds like a good idea. I will add it to the PR.

@mmzeeman
Copy link
Contributor Author

@garazdawi The currently the documentation goes like this (Source: https://www.erlang.org/doc/apps/os_mon/memsup.html#module-configuration)

The threshold, as percentage of system memory, for how much system memory can be allocated before the corresponding alarm is set. The default is 0.80 (80%).

Which is a probably (intentionally) bit vague. Shall I make it more explicit and say that this is total - available memory on Linux and Apple? Or is that too much detail?

Maybe the release notes should mention the details.

@garazdawi
Copy link
Contributor

I thought I has replied to this... but apparently not.

I think that we should update the docs to be more specific, possibly adding a note saying that the source may change in between releases as better values are exposed by the OS.

@garazdawi garazdawi merged commit a6020c6 into erlang:maint Oct 17, 2024
20 checks passed
@garazdawi
Copy link
Contributor

Thanks!

@garazdawi garazdawi added this to the OTP-27.2 milestone Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants