5 ms·
That's Docker for Mac versus native Docker. Docker only runs on Linux, so Docker for Mac spins up a linux VM to run your containers. When you mount your Ruby or
by throwaway894345 5y ago
That's Docker for Mac versus native Docker. Docker only runs on Linux, so Docker for Mac spins up a linux VM to run your containers. When you mount your Ruby or Python projects into your containers, Docker for Mac marshals tons of filesystem events over the host/guest boundary which absolutely devastates your CPU.
Docker for Mac is really just bad for your use case.
No idea what's going on with the thumb drive, bluetooth, etc.
Beyond that, it's a little silly to compare a desktop (presumably many times larger, ~500+W power supply, cooling system, etc) with a Mac mini (tiny, laptop chip, no fans, etc).
- saila 5y agoI used to run Docker on an older Intel Mini and it was fine--a little slow but usable. I've also used it on other Intel Macs without major issues, including running giant Java apps and SQL Server. On my M1 Mini, I found it unstable and incredibly slow (for Postgres at least, using stock images from Docker Hub) and mostly quit using it. I upgraded to the latest version recently and it was still too slow. For everything else, though, I find that the M1 Mini is significantly faster. E.g., compiling Python versions is way faster.
- pxc 5y agoWhat's the CPU arch of the container images you're running?
- saila 5y agoThe postgres image (postgis/postgis:12-3.1-alpine) is linux/amd64. I see now that the official postgres images have other arch options compared to the postgis images, which are arm64 only. I wonder if that could make a difference... And now I see that Docker Desktop actually shows a warning about potentially poor performance when using an amd64 image: "Image may have poor performance, or fail, if run via emulation." This is good news, since I'd much rather use Docker to run postgres in dev.
- saila 5y agoCorrection: in paragraph 2, "arm64" should be "amd64" Update: I switched to an official postgres image and it works great. I just had to create a derived image that installs PostGIS like so: FROM postgres:13-bullseye RUN apt-get -y install postgresql-13-postgis-3
- savoytruffle 5y agoEvery Mac mini has had a fan. The 2018 Intel version and the M1 version use a lot of the small internal space for a large fan.
- musicale 5y agoI wonder how well ARM64 is supported in the Docker community? Presumably x86 Docker images running in emulation would be even slower than ARM64 images running in a Linux VM. Though as you note they're completely different classes of hardware (500W vs. 26.5W), a more Apples-to-Apples (so to speak) comparison would be native Ubuntu on both systems, though as I understand it Ubuntu for M1 is not complete and may lack GPU support and other important features.
- chrisjc 5y agoI don't think chip architecture was the main issue that the parent was alluding to. The same issues would arise if it was Docker running an x86 image on an x86 chip on a Mac. Docker doesn't run natively on OSX, unlike Linux where it does. As a result, Docker Desktop for Mac spins up a linux VM, and this is where penalties begin to be payed. I do wonder if Docker Desktop is smart enough to tailor the VM's architecture to the image's architecture? Moreover, is it smart enough to tailor both the VM's architecture and images architecture to the host's hardware architecture? I'd be interested to see how these soft and hard architecture combinations actually change the performance characteristics: M1/ARM -> x86-VM -> ARM-image vs M1/ARM -> ARM-VM -> ARM-image I wonder how difficult it would be to support docker natively on OSX (BSD?) or if Apple has any intention on providing that support?
- throwaway894345 5y ago> I wonder how difficult it would be to support docker natively on OSX (BSD?) or if Apple has any intention on providing that support? I think it would be pretty difficult. Mac would effectively have to provide a fully compatible Linux interface in its kernel. It would probably be more likely to build a better fs-event bridge to guest systems, but considering MacOS still doesn’t have ext4 support, I’m not counting on it.
- throwaway894345 5y agoIt’s supported pretty well. I’m running a Kubernetes cluster on Raspberry Pis and these days most popular images have ARM64 support.
- shados 5y ago> Beyond that, it's a little silly to compare a desktop (presumably many times larger, ~500+W power supply, cooling system, etc) with a Mac mini (tiny, laptop chip, no fans, etc). You're totally right, but I see a lot of folks around me making absolutely bonker claims on these M1 devices. If I believed everything I'm told, I'd be expecting them to run complex After Effect rendering at 10000 frames per second.
- rbanffy 5y agoIf Geekbench scores are an indication, it is well into the HEDT league [1]. Some results of previous-gen servers are equally surprising, such as this 2-way 2x64-core EPYC Rome setup [2]. 1- https://browser.geekbench.com/v5/cpu/compare/10508517?baseline=10496766 https://browser.geekbench.com/v5/cpu/compare/10508517?baseli... 2- https://browser.geekbench.com/v5/cpu/compare/9997439?baseline=10496766 https://browser.geekbench.com/v5/cpu/compare/9997439?baselin...
- matwood 5y ago> You're totally right, but I see a lot of folks around me making absolutely bonker claims on these M1 devices. I bought an M1 MBA to replace a 2017 (might have been 2018 - I forget now) top specced Intel MBP and it cut the time to run my large Java test suite in half. Of course those are generations/years apart in technology, but the MBA doesn't have fans, barely gets warm, the battery lasts days, and it's the low end of the first generation M1. I'll fully admit that there might be other systems out there that can do exactly that in the same fan less, portable package that I'm unaware of.
- BugsJustFindMe 5y ago> You're totally right, but I see a lot of folks around me making absolutely bonker claims on these M1 devices. What "but"? The claims are less bonkers with a perspective that acknowledges the significance of those physical differences. Without the case, would the full internals (motherboard/CPU/GPU/PSU/ram/heatsinks/storage) of your desktop fit in your pants pockets? Because the M1 Mac Mini's fit in mine. How much fan noise does your desktop produce? How much electricity does it consume? M1s are fast compared to almost everything, but they're bonkers fast compared to anything getting even remotely close to 20 hours on a battery at 3 lbs weight.
- mvanbaak 5y ago> Docker for Mac is really just bad for your use case. Nah, not just for mac, docker is really just bad. period ;P
- throwaway894345 5y agoWhat’s wrong with Docker? Are you opposed to Docker specifically or containers generally? What’s the problem and what’s your preferred solution?
- flatiron 5y agoDocker is certainly a hammer that makes a lot of problems look like nails. Maybe too frequently. But you can’t really debate that it’s a really powerful hammer.