stats icon indicating copy to clipboard operation
stats copied to clipboard

Aggregate RAM usage by parent process

Open andrewr-dev opened this issue 1 year ago • 8 comments

Proposal to fix the following with a new Combine processes option: Fixes: https://github.com/exelban/stats/issues/2099 Fixes: https://github.com/exelban/stats/issues/2162

andrewr-dev avatar Dec 31 '24 04:12 andrewr-dev

hi. Thanks for your contribution, at first look it looks fine. But I will need some time to check how it works and if all cases are covered. Will back with feedback later.

PS: please ping me in case I will not provide any feedback in 7 days

exelban avatar Jan 01 '25 11:01 exelban

Zrzut ekranu 2025-01-11 o 18 21 43

something is totally off

exelban avatar Jan 11 '25 17:01 exelban

Code was displaying resident_size Changing it to display phys_footprint seems like a closer match to the Memory column in Activity Monitor

andrewr-dev avatar Jan 12 '25 03:01 andrewr-dev

Hi, are you at least run and check this PR? The second time it's totally of from what activity monitor shows.

Zrzut ekranu 2025-01-19 o 12 54 28

exelban avatar Jan 19 '25 12:01 exelban

The previous screenshot is showing individual process usage. You need to look at the process hierarchy, eg. lldb-rpc-server is a child process of XCode so the memory usage is added together. Similarly, all the Safari processes are added together and grouped under Safari. The InferenceProviderService process is owned by another user (_modelmanagerd) and the memory usage for this process not shown.

andrewr-dev avatar Jan 19 '25 21:01 andrewr-dev

Also I changed a line in Modules/RAM/popup.swift to correct an existing issue with the way GB is displayed (changed GB RAM to use powers of 2 rather than decimal). The screenshot seems to be missing this minor correction.

andrewr-dev avatar Jan 19 '25 22:01 andrewr-dev

Hi. Sorry for so long response. There is still some problems with non combined processes. It does not show all processes for some reason: Activity Monitor - current reader - this PR reader with disabled "combine processes"

Zrzut ekranu 2025-03-16 o 11 36 35

For some reason this implementation missing some processes

exelban avatar Mar 16 '25 10:03 exelban

This implementation works fine when combined processes is enabled. Maybe will be better to separate these modes:

  • current implementation when combined processes is disabled
  • your implementation for enabled combined processes option

exelban avatar Mar 16 '25 10:03 exelban