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

Show the correct amount of free memory available on the system #1179

Merged
merged 3 commits into from
May 9, 2022

Conversation

aseigo
Copy link
Contributor

@aseigo aseigo commented May 9, 2022

Attempts to use the available_memory stat, otherwise tries to cobble it together using cached+buffered+free as per the erlang docs on :memsup:get_system_memory_data and only failing that flals back to free_memory.

I have only been able to test it so far on Linux, but have tested all the branches of the measure_free_memory functions. Testing it on other OS's would be good.

Incorrect without this patch:

memory_reporting_before

Correct, after this patch:

memory_reporting_after
.

Attempts to use the `available_memory` stat, otherwise tries to
cobble it together using cached+buffered+free as per the erlang
docs on `:memsup:get_system_memory_data` and only failing that
flals back to `free_memory`
@CLAassistant
Copy link

CLAassistant commented May 9, 2022

CLA assistant check
All committers have signed the CLA.

Co-authored-by: Jonatan Kłosko <[email protected]>
@aseigo
Copy link
Contributor Author

aseigo commented May 9, 2022

The CLA link is not working for me, btw. So I can't actually sign it :/

@josevalim
Copy link
Contributor

@aseigo can you please try again? And if it still fails, which error are you running into?

@aseigo
Copy link
Contributor Author

aseigo commented May 9, 2022

It worked this time, @josevalim :) From the web console, it was getting errors from a github REST endpoint ... :/ But it works now! So, all's well that ends well?

Copy link
Member

@jonatanklosko jonatanklosko left a comment

Choose a reason for hiding this comment

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

Thanks!

@jonatanklosko jonatanklosko merged commit 2a8c95c into livebook-dev:main May 9, 2022
@aseigo aseigo deleted the bug/fix-free-memory-display branch May 10, 2022 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants