Open k2662 opened 7 months ago
How much do they differ? Can you provide examples?
How much do they differ? Can you provide examples?
by up to 3GB. like: if actual was 12GB then it would show 9.3GB
Any update?
@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 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 andvm_stat
on a macOS GitHub runner here, where the free memory reported bylibmacchina
approximately matches the free and inactive pages ofvm_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
Is this not being fixed?
Perhaps @123marvin123 can help us with this issue :)
I believe this happens because Activity Monitor includes compressed memory as used memory. There are some discrepancies in how different apps report this metric. "iStat Menus" includes also the compressed memory, but many command line tools (e.g. https://github.com/giampaolo/psutil) do not.
So I'm not sure what is the best approach.
the reported memory usage is lower than shown in activity monitor.