

My suspicion is that the issue is IO related. Right now I’m just being careful about the amount of volumes I use and closing Docker desktop when not in use.

That doesn’t solve the overall issue of not being able to use volumes with Docker for mac. I also manually removed some named volumes: docker volume rm NameOfVolumeHere My CPU % went back down to normal after I removed all my volumes. I tried this and got a small ~10% reduction in CPU usage. One comment suggests adding volume caching described here.

Github – docker/for-mac: 100% cpu usage is back again #3499 There 1365 stack traces in 17 seconds in which created threads which averages to 80 threads per second. The most common stack traces in user space over 17 seconds clearly implicate. Kernel`IOWorkLoop::runEventSources()+0x1e2 Kernel`IOInterruptEventSource::checkForWork()+0x13c Kernel`IOCommandGate::runAction(int (*)(OSObject*, void*, void*, void*, void*), void*, void*, void*, void*)+0x138ĪppleIntelLpssSpiController`AppleIntelLpssSpiDevice::transferData(IOMemoryDescriptor*, void*, unsigned long long, unsigned long long, IOMemoryDescriptor*, void*, unsigned long long, unsigned long long, unsigned int, AppleIntelSPICompletion*)+0x151ĪppleHSSPISupport`AppleHSSPIController::transferData(IOMemoryDescriptor*, void*, unsigned long long, unsigned long long, IOMemoryDescriptor*, void*, unsigned long long, unsigned long long, unsigned int, AppleIntelSPICompletion*)+0xccĪppleHSSPISupport`AppleHSSPIController::doSPITransfer(bool, AppleHSSPITransferRetryReason*)+0x97ĪppleHSSPISupport`AppleHSSPIController::InterruptOccurred(IOInterruptEventSource*, int)+0xf8 AppleIntelLpssGspi`AppleIntelLpssGspi::regRead(unsigned int)+0x1fĪppleIntelLpssGspi`AppleIntelLpssGspi::transferMmioDuplexMulti(void*, void*, unsigned long long, unsigned int)+0x91ĪppleIntelLpssSpiController`AppleIntelLpssSpiController::transferDataMmioDuplexMulti(void*, void*, unsigned int, unsigned int)+0xb2ĪppleIntelLpssSpiController`AppleIntelLpssSpiController::_transferDataSubr(AppleInfoLpssSpiControllerTransferDataRequest*)+0x5bcĪppleIntelLpssSpiController`AppleIntelLpssSpiController::_transferData(AppleInfoLpssSpiControllerTransferDataRequest*)+0x24f

These kernel stack traces look innocuous. Stack traces from the dtrace scripts in the answer below. So, the docker embedded host isn’t causing the CPU usage spike. The CPU usage on docker embedded host is ~3%. The physical size matches the logical size.ĭtruss sudo dtruss -p $DOCKER_PID shows a large number of psynch_cvsignal and psynch_cvwait calls. According to What is Docker.qcow2?, Docker.qcow2 is a sparse file that’s the persistent storage for all Docker containers. Iosnoop shows that performs about 50 writes per second totaling 500KB per second to the file Docker.qcow2. How do I diagnose the cause of Docker on MacOS, specifically using 100% of CPU?ĭocker stats shows all the running containers have low CPU, memory, net IO and block IO.
