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

recon_alloc:memory(usage) > 1 ? #55

Open
walter-weinmann opened this issue Feb 1, 2017 · 3 comments
Open

recon_alloc:memory(usage) > 1 ? #55

walter-weinmann opened this issue Feb 1, 2017 · 3 comments

Comments

@walter-weinmann
Copy link

In 38 of 4258 cases, the result of this call is greater than 1. What can be the cause? The maximum value is 32.13506572.

@ferd
Copy link
Owner

ferd commented Feb 1, 2017

The one reason I'd see for that is that there is memory allocation taking place between both calls. The usage call goes for the allocator data twice for ease of implementation: https://github.com/ferd/recon/blob/master/src/recon_alloc.erl#L226 I'm guessing this causes problems if you'Re not working from a snapshot.

@walter-weinmann
Copy link
Author

Ok thanks - but can it then also be that values looking plausible (i.e. <= 1) are wrong ?

@ferd
Copy link
Owner

ferd commented Feb 1, 2017

There's a chance, but I wouldn't expect the discrepancy to be too big unless you're trying the call on a VM that essentially does nothing but that call. The code could be reworked to make all calculations from a single snapshot.

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

No branches or pull requests

2 participants