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

macos memory usage incorrect #166

Open
k2662 opened this issue Apr 25, 2024 · 5 comments
Open

macos memory usage incorrect #166

k2662 opened this issue Apr 25, 2024 · 5 comments

Comments

@k2662
Copy link

k2662 commented Apr 25, 2024

the reported memory usage is lower than shown in activity monitor.

@Gobidev
Copy link
Contributor

Gobidev commented Apr 25, 2024

How much do they differ? Can you provide examples?

@k2662
Copy link
Author

k2662 commented Apr 25, 2024

How much do they differ? Can you provide examples?

by up to 3GB. like: if actual was 12GB then it would show 9.3GB

@k2662
Copy link
Author

k2662 commented May 8, 2024

Any update?

@Gobidev
Copy link
Contributor

Gobidev commented May 9, 2024

@k2662 Can you provide a screenshot of the memory usage reported by the activity monitor along with running vm_stat in a terminal? There are multiple options of what to count as used memory so it would be interesting to see what the activity monitor uses.

I don't own any device running macOS so testing is somewhat difficult. What I tried is running the libmacchina readouts and vm_stat on a macOS GitHub runner here, where the free memory reported by libmacchina approximately matches the free and inactive pages of vm_stat combined:

libmacchina:
reported free: 3330848 [kB] = 3410788352 Bytes

vm_stat:
reported free: 26076 [Pages] = 427229184 Bytes (1 Page = 16384 Bytes)
reported inactive: 183623 [Pages] = 3008479232 Bytes
free + inactive = 3435708416 Bytes

@k2662
Copy link
Author

k2662 commented May 9, 2024

@k2662 Can you provide a screenshot of the memory usage reported by the activity monitor along with running vm_stat in a terminal? There are multiple options of what to count as used memory so it would be interesting to see what the activity monitor uses.

I don't own any device running macOS so testing is somewhat difficult. What I tried is running the libmacchina readouts and vm_stat on a macOS GitHub runner here, where the free memory reported by libmacchina approximately matches the free and inactive pages of vm_stat combined:

libmacchina:
reported free: 3330848 [kB] = 3410788352 Bytes

vm_stat:
reported free: 26076 [Pages] = 427229184 Bytes (1 Page = 16384 Bytes)
reported inactive: 183623 [Pages] = 3008479232 Bytes
free + inactive = 3435708416 Bytes

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants