asitop icon indicating copy to clipboard operation
asitop copied to clipboard

High memory usage after having a extened session

Open ChihayaK opened this issue 2 years ago • 3 comments

I relized this problem when I forgot to terminate the asitop and let it run overnight. The next day I noticed that some program is using a huge amount of memory. After terminated the asitop it released nearly 15 gigs of memory. Is this the inteded behavior because of the nature of logging?

ChihayaK avatar Nov 08 '21 07:11 ChihayaK

Yeah it could be the case that the powermetrics process started by asitop could have been accumulating memory. I don't think asitop itself will use so much memory, it only logs maximum 30s of power information.

Although it is not intended, if the issue is powermetrics, I don't have a solution for that short of restarting the process at an interval of maybe a few hours.

tlkh avatar Nov 08 '21 08:11 tlkh

After read though the man page of powermatrics I think this could be eliminated by giving an -n argument to limit its periodic sample instead of the default unlimited samples. But I am just guessing, I will do some testing tonight.

ChihayaK avatar Nov 08 '21 08:11 ChihayaK

Yes, previously I had just called powermetrics with -n1, it was the most logical to me at that time. However, every time the powermetrics process starts and stops, there is a overhead that results in a performance hit (for example, if you are doing any form of benchmarking.

So probably there should be a kind of balance...

tlkh avatar Nov 08 '21 09:11 tlkh