bottom
bottom copied to clipboard
[Bug]: memory usage on macOS does not match activity monitor
Checklist
- [X] I've looked through troubleshooting, known problems, and existing issues for similar issues.
Describe the issue
(...) I just installed bottom 0.6.8. with cargo on my mac and it is massively underreporting my memory usage.
Originally posted by @Akari202 in https://github.com/ClementTsang/bottom/issues/544#issuecomment-1218955960
What operating system are you using?
macOS
What architecture are you using?
No response
What terminal(s) are you running bottom on?
No response
What version of bottom are you running?
0.6.8
How did you install bottom?
Cargo
How can we reproduce this?
Run and compare with activity monitor.
Additional information
No response
@Akari202 I can reproduce somewhat on my own MBP, will take a look. I'm experimenting with changing my data providing library entirely across the board so that might help. Will get back when I figure something out.
Just some random stuff I've noted while checking this quickly and getting myself back up to speed, this isn't representative of anything final:
While it doesn't match activity monitor, it does match htop. As mentioned in #545, the calculation we're using right now is usage = wire + active. I'm guessing AM uses another calculation for what it counts as "memory used" (EDIT: this might be close but it doesn't seem to match on my M1.. which leaves bigger questions).
EDIT 2: related htop issue: https://github.com/htop-dev/htop/issues/955
I think this is technically resolved right now by #1036, so I'm closing this for now. It's not as fine-grained as I would like though, which I'll be tracking in #1043.