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

Memory Pressure doesn't seem to match what Activity Monitor shows #47

Open
luckman212 opened this issue Feb 11, 2017 · 7 comments
Open
Labels

Comments

@luckman212
Copy link
Contributor

@geigi Thank you for the contribution of the memory pressure stats. I should have tested it earlier when it was still an open PR but since Yuji made the new binary public today I gave it a go. On my system (Mac Mini with 16GB RAM, Sierra 10.12.3) the pressure bar in MenuMeters doesn't seem to align with the values in Activity Monitor.

For example, see the screenshot below, where Activity Monitor shows pressure at around 45% but the Menubar appears to be around 25%

I then proceeded to launch as many apps as possible to try to increase the pressure, and while Activity Monitor's graph steadily increased, the MenuMeter seemed to stay stagnant. I had my update value at 10seconds (default)

Any idea why that might be?

image

@geigi
Copy link
Contributor

geigi commented Feb 11, 2017

Hey :)
yeah I'm aware of that issue... I'm using an unoffical API from the system which only provides 4 different values for memory pressure: normal (1), 2, warning (3) and critical (4). Activity monitor uses additional information to calculate the memory pressure that is displayed in the graph you screenshoted. There is only a little bit of information out there on how activity monitor actually calculates the memory pressure and there is no API for it available. I couldn't figure it out yet. If the graph in activity monitor gets yellow, memory pressure is in the warning state and the menu bar indicator will rise, also if it gets to the critical state (red in activity monitor). I learned everything from here: http://apple.stackexchange.com/questions/107126/what-scale-or-measure-does-mavericks-and-yosemites-memory-pressure-adhere-to

@luckman212
Copy link
Contributor Author

I see. Too bad there's no way to expose the "real" value displayed in Activity Monitor. In that case I believe a simple colored dot would be better: green/yellow/red. It's a bit hard to see the light green bar graph and the way it appears now, and gives you a false idea that somehow your memory pressure is only 25% when in fact it could be much higher.

@geigi
Copy link
Contributor

geigi commented Feb 19, 2017

I like your idea, it is not as misleading as the current bar. I currently don't have time to implement this but it's on my list :)

@yujitach yujitach added the bug label Apr 26, 2018
@yujitach
Copy link
Owner

yujitach commented Dec 5, 2020

https://github.com/tramdas/memstatpoller shows how to get the info the Activity Monitor displays.

@yujitach yujitach reopened this Dec 6, 2020
@yujitach
Copy link
Owner

yujitach commented Dec 6, 2020

resolved in the commit 9835cff . Will be available in the next release .

@yujitach yujitach closed this as completed Dec 6, 2020
@CheyiLin
Copy link

CheyiLin commented Dec 15, 2020

With the latest 2.1.2.2, the memory pressure still doesn't match the graph I saw in Activity Monitor:
(Macbook Pro 2019, Big Sur 11.0.1)
image

@yujitach
Copy link
Owner

You're perfectly right. I'm reopening the issue. What MenuMeters currently displays is what the command line tool memory_pressure reports as System-wide memory free percentage:.

@yujitach yujitach reopened this Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants