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

high cpu issue using v3.1.0 #5413

Closed
2 tasks done
jsharpe-ctm opened this issue Mar 2, 2021 · 8 comments
Closed
2 tasks done

high cpu issue using v3.1.0 #5413

jsharpe-ctm opened this issue Mar 2, 2021 · 8 comments

Comments

@jsharpe-ctm
Copy link

Similar to:
#3539
#3499

  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • [] I have uploaded Diagnostics
  • Diagnostics ID:

Expected behavior

CPU Consumption would be more 'normal'

Actual behavior

After a few minutes of starting redis instance, cpu spikes to 200%, but redis isn't doing much

Information

  • Is it reproducible? For me, very reproducible. It seems very tied to starting a container using redis:latest
  • Is the problem new? It's been going on for weeks now, but might be getting worse. I find myself restarting docker multiple times throughout the day. Though, now, the issue shows up within a minute or two.
  • Did the problem appear with an update? Not sure. I don't recall docker notifying me it was updating. I haven't initiated an update. So... probably not?
  • A reproducible case if this is a bug, Dockerfiles FTW.
    -->
  • macOS Version: 10.15.7
  • Docker Desktop Version: 3.1.0

Steps to reproduce the behavior

version: "3.9"
services:
  mysql:
    restart: always
    image: percona:5.6.51
    volumes:
      - ./config/my_dev.cnf:/etc/my.cnf.d/my_dev.cnf
      - ./../data/mysql-5.6:/var/lib/mysql
    environment:
      MYSQL_ALLOW_EMPTY_PASSWORD: 1
    ports:
      - "3306:3306"

  redis:
    restart: always
    image: redis:latest
    ports:
      - "6379:6379"

  memcache:
    restart: always
    image: memcached:latest
    ports:
      - "11211:11211"

  mongodb:
    restart: always
    image: mongo:3.0.15
    volumes:
      - ./db/:/db-backup/
      - ./../data/mongodb-3.0:/usr/local/var/mongodb
    ports:
      - "27017:27017"

  elasticsearch:
    restart: always
    image: docker.elastic.co/elasticsearch/elasticsearch:7.5.2
    volumes:
      - ./../data/elasticsearch-7.5:/usr/share/elasticsearch/data
    ports:
      - "9200:9200"
      - "9300:9300"
    environment:
      - discovery.type=single-node
      - node.name=es01
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Dmapper.allow_dots_in_name=true -Xms2g -Xmx2g"
    ulimits:
      memlock:
        soft: -1
        hard: -1

For me, it seems tied to the redis instance. If I stop redis, the issue mostly goes away:

Lightly using redis:
Activity_Monitor__My_Processes__and_tmux

Stopped processes (on host) using redis lowers CPU... but host CPU is still seemingly way too high.
Activity_Monitor__My_Processes__and_tmux

Docker should have plenty of resources:
Settings

@EmrysMyrddin
Copy link

EmrysMyrddin commented Mar 3, 2021

I also have a very high CPU consumption, even without any running container, on fresh docker install.

image

image

Running on latest macOS Big Sur 11.2.2 on a mid 2015 15inch MacbookPro:
image

The proof nothing is running:

➜  qmk_firmware_custom git:(old_custom_keymap) ✗ docker ps -a
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

Here a diagnostic ID: 25E494D6-C047-4FA1-BA98-2E1E5CF37DBD/20210303100003

[UPDATE] Seems that kernel_task seems a little high too, perhaps related ?
top 10 cpu

@guycalledseven
Copy link

guycalledseven commented Mar 3, 2021

Running Docker Desktop 3.2.0(61504) on macOS Catalina v10.15.7., i7 MBP

I also have EXTREME CPU load of com.docker.backend when running just Docker by it self, without ANY containers running and I can 100% confirm that reason for this is gRPC.

When I turn off gRPC, I get normal cpu loads, without com.docker.backend popping up in Activity Monitor.
BuT, then I randomly get out of sync issues of my local files and docker containers, which is even worse issue. :(

After more investigation I think the default Resources / File share is too large/wide and I think that causes gRPC to freak out (because of tons of files I got).

However I am unaware how to set it up properly. Any attempt to narrow File shares down (eg. to only current working project directory) resulted in Docker for Mac not starting with exact issues described here in #5382 . Only manual removal and clean install would help.

Screenshot 2021-03-03 at 21 31 17

For comparison - on same machine I was previously running docker via docker-machine with Parallels driver, (running boot2docker in Parallels VM). Compared to this - it was faster w/ more latency but ever have I experienced such fans blazing.

@EmrysMyrddin
Copy link

For me it is not the same issue.
In my case, it is com.docker.hyperkit the problem. I have tried to switch to the experimental virtualization framework, it is more or less the same, perhaps a little better.

I have also tried to disable gRPC filesystem, removing every shared folders, it changes nothing.

@guycalledseven
Copy link

Several restarts and reinstalls lates I managed to cut down the list of Shared folders to only folders I need (3 of them) with minimal set of files and to leave gRPC enabled.

I can confirm that high cpu is gone. com.docker.hiperkit shows up durring requests to docker containers, normally, but there is no more excessive fan noise coming out of computer when containers are stopped.

@esidebo
Copy link

esidebo commented Mar 26, 2021

I have possibly a similar issue. Very high CPU for com.docker.hyperkit, when working with container in which I'm developing (using VSCode). I have bind mounted my work directory (size ~1GB) and attach to the container in VSCode. If doing nothing the CPU is around 15%-20%, but as soon as I edit one line of code sitting in the work directory the CPU ramps up to ~150-200% with fans going full blast as a result. Possibly file sync related? Like @EmrysMyrddin I tried the experimental virtualization framework without much improvement (I'd also say it is maybe slightly better).

Docker desktop version: 3.2.2.
mac OS: Big Sur 11.2.3.
Diagnostics ID: 32687E95-9CFC-4F3C-B944-FF38BAA0CFA3/20210326080656

I just upgraded Docker desktop (can't remember previous version, I think 2.4.something) and OS (previously Catalina), without improvement as far as I can tell.

Btw, under Resources I see 55.9/59.6 GB used. I don't get why that's so high, is it a problem?

@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

@tjamet
Copy link

tjamet commented Jul 7, 2021

Hi!

I also experience high CPU usage when running the gRPC Fuse file sharing, and this remains upon factory reset.

image

Following reading this issue, I have just disabled the gRPC and the CPU usage seems way lower so far.

I am using the default sharings with some external drive mounts (3.6TB HFS) and ~ 300GB /users

image

Docker for mac version:
image

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

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

@docker docker locked and limited conversation to collaborators Sep 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants