bottom icon indicating copy to clipboard operation
bottom copied to clipboard

[Bug]: memory usage on macOS does not match activity monitor

Open ClementTsang opened this issue 3 years ago • 2 comments

Checklist

Describe the issue

(...) I just installed bottom 0.6.8. with cargo on my mac and it is massively underreporting my memory usage.

Screen Shot 2022-08-17 at 20 52 36

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

ClementTsang avatar Aug 18 '22 03:08 ClementTsang

@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.

ClementTsang avatar Aug 18 '22 03:08 ClementTsang

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

ClementTsang avatar Aug 18 '22 03:08 ClementTsang

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.

ClementTsang avatar Mar 06 '23 08:03 ClementTsang