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

Not detecting full process memory? #4

Open
Adreitz opened this issue Apr 17, 2023 · 2 comments
Open

Not detecting full process memory? #4

Adreitz opened this issue Apr 17, 2023 · 2 comments

Comments

@Adreitz
Copy link

Adreitz commented Apr 17, 2023

I found this project when trying to find an automated solution for reporting the maximum memory of a process. I got it running, but the values memplot reports don't match Activity Monitor. I am trying to monitor python running Stable Diffusion, which uses a lot of memory at high resolutions. When Activity Monitor reported ~35-38 GB used, memplot only ~2.8 GB. The variation in memory use over time also did not match the values reported by Activity Monitor. Is it possible this has something to do with the unified memory structure if Activity Monitor reports full memory use but memplot might ignore the portion used by the GPU?

Thanks!

MacBook Pro M2 Max 64GB
MacOS 13.4b2

[Edit] By the way, I think it might be a good addition for memplot to be able to report, numerically, the max, avg, and min memory usage (and maybe the timestamps of the max and min). Maybe also find a way of filtering the data so that the min memory reporting ignores the shutdown sequence of the process if it terminates during monitoring.

Also, I think the MacOS binary for Apple Silicon should be suffixed "arm64", not "amd64". [/Edit]

@0x0f0f0f
Copy link
Owner

Memplot is not tracking GPU memory!

@Adreitz
Copy link
Author

Adreitz commented Apr 18, 2023

Okay, just keep in mind that Apple Silicon Macs no longer differentiate between RAM and VRAM -- it's all the same, just used by processes for different things.

After some searching around and testing myself, I found that the "footprint" command line program generates data that seems to be what I want to see and can be programmed to poll at a desired rate. Piped to awk to pick out just the number I want and then redirected to a file, I can then generate a record of memory use over time.

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

No branches or pull requests

2 participants