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

Energy Usage on OSX #4323

Open
2 tasks done
dylanz opened this issue Feb 28, 2020 · 57 comments
Open
2 tasks done

Energy Usage on OSX #4323

dylanz opened this issue Feb 28, 2020 · 57 comments

Comments

@dylanz
Copy link

dylanz commented Feb 28, 2020

  • I have tried with the latest version of my channel (Stable)
  • I have uploaded Diagnostics
  • Diagnostics ID: C58F8A02-6CC5-48F0-9737-47777B1E9898/20200228233832

Expected behavior

Running Docker Desktop with no running containers, and Running Docker Desktop/Kubernetes with no running applications, should not have such a high Energy Impact on OSX.

Actual behavior

The Energy Impact on OSX is quite high even with no containers running.

Information

  • macOS Version: 10.14.6

Running just Docker Desktop
docker

Running Docker Desktop and Kubernetes
docker with kubernetes

... in both cases, no containers are running
container status

Diagnostic logs

Docker for Mac: 2.2.0.3 (42716)

Steps to reproduce the behavior

  1. Install Docker Desktop
@dylanz
Copy link
Author

dylanz commented Feb 29, 2020

Side anecdote: after spinning down my local Kubernetes cluster, about an hour later and docker ps still shows no containers running, my machine started getting super loud/hot and Activity Monitor showed this:

kubernetes memory use

Some more detail on the specs of the machine I'm working on:
local machine

@cculianu
Copy link

I see the exact same thing on my system. Consistently. No containers are running. com.docker.hyperkit eating 20% CPU every few seconds all day, every day, for no reason.

@AzaubaevViktor
Copy link

The same

@Radren
Copy link

Radren commented May 14, 2020

I've had the same situation since last week, started suddenly

@cramhead
Copy link

Same on docker desktop 2.3.0.2(45183) with macOS 10.15.4

@StefanSchubert
Copy link

Same on Docker Desktop 2.3.0.3 (45519) with macOS 10.15.5
I have given Docker only 2 CPUs but the machine ist still getting hot.
I regret to have performed the latest update :-(

Please fix this.

Thanks for the docker port
Stefan

@Rykus0
Copy link

Rykus0 commented Jul 2, 2020

Same here. Energy impact is around 440 (other apps peak around 25, normally around 2-3).
I can't keep docker running. My battery drains when plugged in.
Problem is, when I close docker, my apps have a hard time coming back up after restart.
Plan is to move away from Docker, in part because of this, but wanted to give this another bump.

image

@Radren
Copy link

Radren commented Jul 3, 2020

I updated OS a couple of times (out off laptop now, can't check the version), it solved energy issues.

@acyuta
Copy link

acyuta commented Jul 31, 2020

Same situation. com.docker.hyperkit eats a lot of energy.

@nkarim496
Copy link

same here

@infolock
Copy link

infolock commented Nov 10, 2020

Ditto. My energy impact is insane with docker running. My Laptop (while plugged in) can be at 100% with docker not running. When I start docker. I can watch the % just drop. in 2 hours time, it went from 100% to 71% (this is while still plugged in).

Screen Shot 2020-11-10 at 4 35 14 PM

I'm not sure what to do. I've tried new AC adapters and everything hoping this was just a mac problem, but it isn't. Just as soon as Docker is closed, I can watch my battery % go back up. Not sure what to do about this either =\

FWIW, I'm currently on v19.03.13. I've been updating it any time a new update comes in. This has been a problem since earlier this year I want to say.

@infolock
Copy link

infolock commented Nov 10, 2020

The other thing I have found is this.

  • If I set the CPUs value to 1, it drops down to a 100+ energy impact, and 54%-115%+ CPU.
  • If I set the CPUs value to 2, it jumps to a 200+ energy impact, and a 112%-240%+ CPU
  • If I set the CPUs value to 5, it jumps to a 500+ energy impact, and a 160-530%+ CPU

I'm not sure if the Docker gods agree, but this seems to either be working as expected (depending on the CPUs setting) or Docker is taking WAY more resources than it actually needs simply because we've given it access to those things.

Not sure which they'll go with, but I'm betting it's door number 1

Either way, this doesn't resolve the issue of the battery being drained. Even with CPU's set to 1 and lowering the energy impact to the 100's level, my battery continues to drain. Closing Docker though - results in battery being charged. =\

@simone-baldini
Copy link

Same here, please fix this.

@pipozzz
Copy link

pipozzz commented Nov 16, 2020

Same problem for me :(

@cculianu
Copy link

They're never going to fix this. I have given up. I just load up docker, use it for what I need, then quit it immediately when my containers are done. Don't leave docker running -- you will have a bad time.

@Aniket-Singla
Copy link

It got even worsen on my mac after updating to big sur.

@sunbit-zackz
Copy link

Did anyone found a workaround yet? something to at least slow the discharge rate? I heavily rely on docker and this keeps me from working...

@infolock
Copy link

infolock commented Nov 25, 2020

There is no workaround. I mean - you could change the CPU value to 1 - but then you may (like me) find that your containers no longer work.

The only option I personally have found is to do this:

  • close docker out
  • wait until your machine goes to 100%
  • re-open docker
  • use it until your battery gets to critical 10%
  • repeat

I know the above sounds obvious... but unfortunately there seriously isn't much else you can do until they get this fixed.

Again - the same issue was raised almost a month ago in this ticket and they closed it. The current ticket has been opened since Feb so that's good news at least. Both are related to the HIGH CPU usage & the HIGH ENERGY usage.

@infolock
Copy link

Good news. Sounds like they may have finally tracked down the issue and are addressing it in #5044 (as mentioned in the last comment on #5070 )

@infolock
Copy link

infolock commented Dec 1, 2020

FWIW I also recently discovered that the AC Adapter provided to me for my Macbook is a 61W where the needed one is a 87W min. While that solves the issues surrounding the battery being drained while docker is open, it doesn't resolve the fundamental issue with docker having a 240+ energy impact (which is roughly 20x+ more than the average application). not sure if there is anything that can even be done about it - but if it can, it should.

@docker-robott
Copy link
Collaborator

Issues go stale after 90 days of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@hannahchan
Copy link

/remove-lifecycle stale

@hhimanshu
Copy link

I have same issue for months

@korbin-up
Copy link

korbin-up commented May 26, 2021

Same here...

@korbin-up
Copy link

/remove-lifecycle stale

1 similar comment
@bramses
Copy link

bramses commented May 27, 2021

/remove-lifecycle stale

@cscetbon
Copy link

It's so annoying ... is there anyone who's working on this issue ? I've heard they've been working on it but it's been at least a year for me now with this issue ...

@angelomelonas
Copy link

Experiencing very high CPU and energy usage and it seems to get worse on each Docker Desktop update.

MacOS Big Sur 11.4

image

@keitorin
Copy link

had to open activity monitor then select CPU tab and search docker then force quit related services, the docker will not show in Using significant Energy then. And i thought quit is enough. lol fyi: my os is macOS Big Sur v11.4

@cculianu
Copy link

You know -- i have been in this thread for at least a year now.

I just want to say that the state of programming in general is an absolute disgrace. So many crappy developers working for big companies like Docker. Let me say this loudly and clearly: THERE IS NO EXCUSE FOR AN IDLE APP TO USE EVEN 0.1% CPU, LET ALONE 20%!!!.

You have extremely shoddy developers working for you, Docker. You suck. This is a disgrace.

@ienliven
Copy link

Still happening with latest docker and OSX versions to date. Incompetents

@hungluu
Copy link

hungluu commented Jul 28, 2021

Docker desktop keeps destroying my Macbook battery every single day :(

@briceburg
Copy link

I also suffer from this on a fresh 2019 MBP.

IMO it has to do with the [linux] hyperkit VM running in the background where containers get scheduled. It would be very cool if we could suspend this VM if no containers are running. Or could toggle it from the status dropdown without having to close app.

Outside of that, I've seen better battery behavior by disabling the gRPC FUSE feature for sharing files and using "legacy osx filesharing" instead.

@MickL
Copy link

MickL commented Aug 4, 2021

Are there any lighter alternatives to Docker? I just need to run images like MongoDB or Redis and it slows down my whole machine and drains my battery SO fast.

@JeromeDesseaux
Copy link

With Docker intention to make money on Docker Desktop, it might be a good idea to fix these bugs first.

@redrockltd
Copy link

It's not much, but when gc is disabled and CPUs resources is set to max 2, battery consumption fall down by 90%. I regret, I figure out this after total destruction of my mac battery... OSX message (Service Recommended), and max lifetime 1h. Thank you Docker :(

image
image
image

@docker-robott
Copy link
Collaborator

Issues go stale after 90 days of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@hannahchan
Copy link

/lifecycle frozen

@hungluu
Copy link

hungluu commented Jan 27, 2022

Are there any updates or plans on the improvement / fixes tho? :(

@vishnun
Copy link

vishnun commented Feb 7, 2022

Facing the same issue still. Hoping someone has an answer.
Screen Shot 2022-02-07 at 3 20 23 PM

@vishnun
Copy link

vishnun commented Feb 8, 2022

Not sure of the root cause for the battery killer state but after running docker system prune command, it stopped sucking up the batter faster than I can charge..It's no longer the highest energy impact app on my mac.

@aofarrel
Copy link

This seems to have gotten worse over time. My 2020 Pro which has never had any battery issues was charged to 90% when I unplugged it. One hour after unplugging it, during which time I didn't use Docker at all, I was at 15%.

Screen Shot 2022-03-18 at 12 19 30 PM

@jorgt
Copy link

jorgt commented Apr 7, 2022

Came here with the same issue.

@notacoat
Copy link

someone please fix this. i will buy you lunch.

@Lorenzschaef
Copy link

Same issue. 2+ years later. Is there really still no solution?

@futurewebsites
Copy link

futurewebsites commented Jul 19, 2022

same issue even with my charger plugged in docker takes more power then goes in - like others I have to quit docker desktop wait for 100% charge then re-open, its killing my productivity.

Can this please be addressed as a matter of urgency !

@krokicki
Copy link

I just noticed this as well. My 24hr energy impact metric for Docker desktop was 171 (!) even though I wasn't using it for anything. During that time frame, Firefox's energy impact was only 13 even though I was mainly web browsing.

@its-miller-time
Copy link

+1 At least now that we are entering winter months, i can use my mac as a space heater....dont even need to wear sweaters anymore....

@stefkohub
Copy link

Still no news on this, i suspect.
I hope someone will find a solution before my battery will be totally damaged...

@pedrokohler
Copy link

I'm also having the same issue. Power consumption is sky high.

@Vorob-Astronaut
Copy link

any fix?

@mianbilalashraf
Copy link

Well, Somehow I succeed in lowering the energy impact of docker on my Mac 😌

I tried updating docker, but it could not even start after the update.
so I got stuck with this error.
image

then I completely removed docker from the Mac like this. (lost containers and images too 🤷🏻‍♂️)
downloaded docker setup and installed it (kept default configs)

current docker version: Docker Desktop 4.20.1 (110738)

then recreated containers.
It's more than 40+ hrs since and I noticed my mac isn't heating up much like before.

Before(usually)
CPU: 300-400%
Energy Impact: 7K - 10K (sometimes even more)

Now(usually)
CPU: 100-200%
Energy Impact: 1.3K - 1.8K (rarely goes up to 4K+ and that too for short period)

*above values are taken from activity monitor app

My docker configs are below.

Screenshot 2023-06-21 at 1 12 10 PM Screenshot 2023-06-21 at 1 12 54 PM (Resources depend on your need) Screenshot 2023-06-21 at 1 13 46 PM

The device I'm using is: Macbook M1 Pro
image

It might be helpful for you guys as well 😇❤️

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

No branches or pull requests