gao-sun / eul

🖥️ macOS status monitoring app written in SwiftUI.
MIT License
9.23k stars 345 forks source link

Power consumption #76

Open gao-sun opened 3 years ago

gao-sun commented 3 years ago
  1. double check if eul costs too much
  2. disable status fetching during sleep
benbender commented 3 years ago

Hey,

just to give some feedback: Yes, PKG-power consumption jumped between 0.8W (normal) and 5W (much too high) with EUL enabled. Additionally the kernel-log was flooded with msgs like:

[  192.558412]: memorystatus: set assertion priority(3) target NetworkWidgetExtension:409
[  192.561556]: memorystatus: assertion priority 3 overrides priority 0 for NetworkWidgetExtension:409
[  192.561880]: memorystatus: assertion priority 3 overrides priority 0 for NetworkWidgetExtension:409
[  192.562075]: memorystatus: assertion priority 3 overrides priority 0 for NetworkWidgetExtension:409
[  192.562577]: memorystatus: assertion priority 3 overrides priority 0 for NetworkWidgetExtension:409
[  192.592370]: memorystatus: assertion priority 3 overrides priority 0 for NetworkWidgetExtension:409
[  192.592573]: memorystatus: assertion priority 3 overrides priority 0 for NetworkWidgetExtension:409
[  192.630168]: memorystatus: assertion priority 3 overrides priority 0 for WeatherWidget:396
[  192.630766]: memorystatus: assertion priority 3 overrides priority 0 for WeatherWidget:396
[  192.672616]: memorystatus: set assertion priority(0) target NetworkWidgetExtension:409
[  192.777223]: memorystatus: assertion priority 3 overrides priority 0 for StocksDetailIntents:1149
[  192.782391]: memorystatus: assertion priority 3 overrides priority 0 for StocksDetailIntents:1149
[  192.786001]: memorystatus: assertion priority 3 overrides priority 0 for StocksDetailIntents:1149
[  192.788455]: memorystatus: assertion priority 3 overrides priority 0 for StocksDetailIntents:1149
[  192.790415]: memorystatus: assertion priority 3 overrides priority 0 for StocksDetailIntents:1149
[  192.793242]: memorystatus: assertion priority 3 overrides priority 0 for StocksDetailIntents:1149
[  192.796745]: memorystatus: assertion priority 3 overrides priority 0 for StocksDetailIntents:1149
[  192.799907]: memorystatus: assertion priority 3 overrides priority 0 for StocksDetailIntents:1149
[  193.043929]: memorystatus: set assertion priority(0) target WeatherWidget:396
[  194.052880]: memorystatus: assertion priority 3 overrides priority 0 for com.apple.Notes.IntentsExtension:1145
[  194.052970]: memorystatus: assertion priority 3 overrides priority 0 for com.apple.Notes.IntentsExtension:1145
[  194.053200]: memorystatus: assertion priority 3 overrides priority 0 for com.apple.Notes.IntentsExtension:1145
[  194.053279]: memorystatus: assertion priority 3 overrides priority 0 for com.apple.Notes.IntentsExtension:1145
[  194.092598]: memorystatus: set assertion priority(0) target StocksWidget:1157
[  195.887737]: memorystatus: assertion priority 3 overrides priority 0 for IntentsExtension:1141
[  195.887913]: memorystatus: assertion priority 3 overrides priority 0 for RemindersIntentsExtension:1142
[  195.990898]: memorystatus: set assertion priority(0) target RemindersIntentsExtension:1142
[  195.990920]: memorystatus: set assertion priority(0) target IntentsExtension:1141
[  196.282668]: memorystatus: assertion priority 3 overrides priority 0 for WeatherIntents:1148
[  196.282803]: memorystatus: assertion priority 3 overrides priority 0 for com.apple.Notes.IntentsExtension:1145
[  196.392272]: memorystatus: set assertion priority(0) target com.apple.Notes.IntentsExtension:1145
[  196.392314]: memorystatus: set assertion priority(0) target WeatherIntents:1148
[  196.741872]: memorystatus: assertion priority 3 overrides priority 0 for MobileTimerIntents:1146

The spikes on the following graph are originating from EUL and vanishing as soon as I stop it:

power-draw3

I'm sorry to say that its barely unusable for me at that state on a laptop atm :/ Besides of that, thanks for your work on this and it looks very promising as soon as this is solved!

gao-sun commented 3 years ago

thank you for detailed feedback. you are right. I'll take a look soon

Nitinrajyadav commented 3 years ago

+1 I'm also experiencing the same issue; eul is flagged as the 2nd most power consuming app after chrome, and the battery is getting drained much faster.

htrung4 commented 3 years ago

Me too, the same as everyone. It increased at least around 2-3W in power consumption, sometimes up to 6W, which is unacceptable in MacBook Pro 2018. Beautiful app anyway, hope you can fix this soon.

gao-sun commented 3 years ago

a quick update, I'm too busy on my daytime work these days, did not get a chance to take a look at this issue. I'll try tonight/tomorrow

pstens commented 3 years ago

Can confirm the issue running the latest version of eul.

I'm not sure if this helps in any way but here's a screenshot of Activity Monitor:

tg_image_140738016

gao-sun commented 3 years ago

hi guys, would you mind to provide your config of eul? would like to see if Show network top activities has been turned on

gao-sun commented 3 years ago

added several improvements in v1.4.4, please try and let me know if it helps

benbender commented 3 years ago

@gao-sun seems better now, but not ready yet. See the chart below. The spikes are there when EUL is running, while in the flat part of the graph I had it closed.

eul

gao-sun commented 3 years ago

thanks @benbender! this is what I've got when eul is running (a little bit lower than yours) image

also, power consumption in activity monitor swings between 0.3~0.7 (mostly under 0.5): image

I checked around and tried to reduce consumption by letting the program just do necessary function calls and disables status fetching during sleep. Would you mind to set refresh rates to 5s to see if the result is acceptable?

If not, I would like take a look in SMCKit/SystemKit to figure out if there's more optimization space.

mishanya14228 commented 3 years ago

Using v1.5.1 on Intel mbp, os version 11.0.1 Energy impact is unnoticeable when not showing info in status bar (0.1-0.2 in activity monitor).

Turning the status bar components on and adding network only brings it to 40.

image

Adding CPU and disk results in 80, which is more than the rest of apps combined :(

image

So I'm using widgets for now, they don't impact on battery that much.

BTW, CPU usage also goes insane

gao-sun commented 3 years ago

image

@mishanya14228 would you mind to click the arrow in the left side and paste the details here?

image

I'm using Chrome for example since there's no arrow in the eul row on my Mac (and power consumption looks not bad!) so I doubt some sub-processes do not exit as expected.

image

P.S. CPU usage is also helpful

mishanya14228 commented 3 years ago

CPU goes up to 100% and the arrow hides diskutil 👇

image image

Also I've experienced something like https://github.com/gao-sun/eul/issues/95 after os restart. There were no tray icon or app interface. I resolved the issue doing Preferences -> Displays -> Resolution -> Scaled -> toggle any resolution and then toggle it back. Tray icon appeared and I could open the app. Probably an issue with OS

gao-sun commented 3 years ago

@mishanya14228 great, got the direction of resolving. also would be great if you can paste the tray icon issue in #95.

gao-sun commented 3 years ago

@mishanya14228 according to these posts (link1 link2 link3), i think it's more like an OS issue when external storage/VM appears in the system. i'll try to find a more stable way to get disk info.

gao-sun commented 3 years ago

@mishanya14228 please try v1.5.4, removed diskutil usage and leverage FileManager instead. the issue should be fixed.

erdemoney commented 3 years ago

Using 1.56. Energy impact in Activity Monitor jumped to ~46, so high that my laptop died on AC. CPU usage was ~50% as well. Average Energy Impact I've been seeing is <1 normally. So it seems like this issue still exists just maybe only in some edge case. After booting my computer things were back to normal. Great app though, really appreciate all the work you've done.

edit: new record /: Screen Shot 2021-01-26 at 1 19 08 PM

gao-sun commented 3 years ago

@erdemoney thank you for detailed feedback, it looks like there's no process hanging under eul, and the energy impact still looks terrible. will keep an eye on it

erdemoney commented 3 years ago

Sure, let me know if there's any other data or logs I can provide to help solve this issue.

forresthopkinsa commented 2 years ago

Still seeing serious energy inefficiency problems in 1.6.2.

image
mjhipp commented 2 years ago

Also having issues with energy in 1.6.2. Am forced to stop using this tool altogether sadly. Fluctuating between 60-80% and preventing my battery from charging (at 85% battery health).

Screen Shot 2022-03-25 at 1 12 56 PM

harounelm commented 5 months ago

uh .... guys XD could anyone tell me whats wrong here, the battery drained like crazy

image
harounelm commented 5 months ago

yeah I think I found out why. im using an M2 Pro MacBook and the answer is in this issue #243