for-mac icon indicating copy to clipboard operation
for-mac copied to clipboard

Memory Leakage com.docker.hyperkit

Open Sebastianbrg opened this issue 8 years ago • 283 comments

NOTES TO FUTURE READERS OF THIS THREAD. PLEASE READ THE WHOLE THREAD BEFORE REPLYING. IN PARTICULAR, PLEASE UNDERSTAND:

  1. There is a bug in MacOS that it reports twice the amount of memory actually allocated.
  2. It is normal that all the memory has to be reserved up front before any containers are running, because of the way that virtualisation works in MacOS Hypervisor.framework.

See https://docs.google.com/document/d/17ZiQC1Tp9iH320K-uqVLyiJmk4DHJ3c4zgQetJiKYQM/edit?usp=sharing for a detailed investigation on this.

-- Stephen Turner


  • [ x ] I have tried with the latest version of my channel (Stable or Edge)
  • [ x ] I have uploaded Diagnostics
  • Diagnostics ID: C19AE3AD-3E52-4F8C-A16A-D06D797B36A4/20180925100823

Expected behavior

No memory leakage.

Actual behavior

Memory leakage.

Information

  • Is it reproducible? Yes. Just start Docker on Mac OS Mojave
  • Is the problem new? Yes, when I upgraded to Mac OS Mojave
  • Did the problem appear with an update?
  • A reproducible case if this is a bug, Dockerfiles FTW.
  • macOS Version: 10.14 (18A391)

Diagnostic logs

Docker for Mac: Version 18.06.1-ce-mac73 (26764)

Sebastianbrg avatar Sep 25 '18 10:09 Sebastianbrg

I also get a memory leak

lou-lan avatar Sep 25 '18 15:09 lou-lan

Me too

sickness29 avatar Sep 26 '18 08:09 sickness29

and me too :( also com.docker.hyperkit loads CPU very much

EduardRakov avatar Sep 26 '18 16:09 EduardRakov

Me too

Zabudska-Yuliia avatar Sep 28 '18 09:09 Zabudska-Yuliia

See #178.

iMerica avatar Sep 28 '18 15:09 iMerica

Also happening for me. Running on macOS High Sierra 10.13.6.

Docker version 18.06.1-ce, build e68fc7a

vfontes avatar Sep 28 '18 16:09 vfontes

Yes this is happening on macOS High Sierra 10.13.6.

Docker version Version 18.06.1-ce-mac73 (26764)

This started happening after I updated the Docker version.

gvbkr avatar Sep 30 '18 23:09 gvbkr

Seeing the same thing.

2.83GB being used without anything running.

Docker version 18.06.1-ce, build e68fc7a

ylor avatar Oct 01 '18 00:10 ylor

4.77Gb with no images and no containers on: macOS: 10.14.1 Beta (18B45d), Docker: 2.0.0.0-beta1-mac75 (27117), Engine: 18.09.0-ce-beta1

AnielloFalcone avatar Oct 01 '18 07:10 AnielloFalcone

Mac OS High Sierra 10.13.4 Docker 18.03.1-ce

Regularly consumes ~1.5GB while completely idle after startup.

mkohlmyr avatar Oct 01 '18 10:10 mkohlmyr

[ x ] I have tried with the latest version of my channel (Stable or Edge) [ x ] I have uploaded Diagnostics Diagnostics ID: 01B9140E-D975-46AE-AEA6-442DC281FAE0/20181001181235 Expected behavior: Low memory use Actual behavior: Doing nothing and consuming 5Gb of memory, it is also reported as the highest energy consumer on my system.

Information Is it reproducible? Yes. Just start Docker on Mac OS Mojave Is the problem new? Don't know, never used it on a different version Did the problem appear with an update? Don't know, never used it on a different version.

MacOS 14 (18A391) Docker Community Edition 18.06.1-ce-mac73 (26764)

Hope this helps.

ghost avatar Oct 01 '18 18:10 ghost

Likewise, noticing this after the os upgrade to mojave. does the update fix the issue? I couldn't figure out from the commits

gauravthadani avatar Oct 03 '18 04:10 gauravthadani

I have run into the same issue. Below are the specifics of my environment. This is with no containers running and a fresh restart.

image image image

asburymr avatar Oct 03 '18 15:10 asburymr

An interesting data point may be that increasing the SWAP seems to dramatically affect the Memory consumed by the hyperkit.

512MB SWAP -> 2GB of memory

image

1GB SWAP -> 3 GB Memory

image

2 GB SWAP -> 5 GB Memory

image

asburymr avatar Oct 03 '18 16:10 asburymr

I have the same issue

alvarobem avatar Oct 03 '18 16:10 alvarobem

Same here. With a container running, com.docker.hyperkit used over 9GB of memory. After a restart, with no containers running, it immediately jumped up to 5.23 GB. Docker version: 18.06.1-ce-mac73 (26764) Docker memory limit: 12GB Docker Swap limit: 4.0GB

I was also able to reproduce the effect @asburymr noticed. When I reduced the swap limit to 512MB, hyperkit went down to under 2GB RAM.

wskinner-eml avatar Oct 03 '18 18:10 wskinner-eml

Same issue.

andypan-twn avatar Oct 04 '18 03:10 andypan-twn

Same issue here with version 18.06.1-ce-mac73, using almost 3 GB memory after startup of my mac with Mojave (10.14)

imuller avatar Oct 04 '18 07:10 imuller

I have this issue with High Sierra 10.13.6 and Docker version 18.06.1-ce-mac73 (26764). com.docker.hyperkit consumes 1.6GB with no containers and 1GB swap. 800MB with no containers and 512MB swap.

Running a container causes com.docker.hyperkit to consume 50-60MB while it is running, but it releases the 50-60MB as soon as the container stops.

TedSpinks avatar Oct 04 '18 16:10 TedSpinks

2018-10-05 13 26 48 same here, on mac

rurkss avatar Oct 05 '18 10:10 rurkss