Live data from Hacker News

Docker on MacOS is slow and how to fix it

paolomainardi.com

111–120 of 211 posts

Re: Docker on MacOS is slow and how to fix it

#112
post #47

Earlier quoted context omitted.

this is very true. not to mention it's very slow on its networking... i've given up docker on macOS long ago. If I was to use docker, I'll switch to my debian laptop. way much much faster.

Happy to give up Docker, but still using MacOS as a daily driver?

yes. it's not that i like macOS, but I need its xcode.

Re: Docker on MacOS is slow and how to fix it

#113
post #19

Earlier quoted context omitted.

My preferred fix: don't develop in Mac.

For many Mac is the only sensible option. There's one developer in our company that uses Linux and it's a lot of pain to setup. Mac has the best balance between coding, utility tools and "other work stuff". Windows probably on par if not more for "work stuff" but falls badly in the coding & tooling department. Linux is OK ish for coding and utility but falls behind for "other work stuff" and certainly a pain to just…

very true. i saw this as well when i was still working in the office ten years ago. in Linux, what you can do is mostly coding and browsing.

Re: Docker on MacOS is slow and how to fix it

#114
post #69

Earlier quoted context omitted.

It a jab at Linux/PC. Apple's completely vertical stack means that their machines never have issues sleeping. The huge variety of machines that Linux (and Windows) is expected to run on can cause problems entering S-states reliably. This issue is pretty uncommon (excluding the Windows modern sleep disaster), but that doesn't prevent comments like the GP throwaway.

Apple laptops definitely have issues sleeping. https://forums.macrumors.com/threads/macbook-air-m1-doesnt-s... There's a litany of bugs in Apple's software. This often gets hidden because developers use workarounds of various sorts, but if you know, you know. It's honestly embarrassing how buggy Apple software is given the vertical integration you describe. The worst part is that almost all of it is closed source so…

> The worst part is that […]

The actual worst part is that it is impossible to draw a meaningful conclusion from a problem report like this one:

> Mine also shines from the holes when closed. M1 Air. Noticed happens when browser is open and i closed the lid.

Yeah, it shines from the holes. Also develops a halo. Sometimes two. Maybe three, dunno. Sometimes the laptop can see stars.

Yes, it can be indeed an OS related problem as it is not bug free. Or, it could be a faulty laptop specimen, or – most likely – the user has installed something on their laptop that meddles with the sleep routine activation. For instance, OS X has a power nap feature that allows the OS to wake up briefly from the slumber, quickly do something (e.g. check mail, syncronise messages etc) and go back into slumbering again. Any application can register with the operating system to be awaken during a power nap.

And this is where the problem occurs. Users install tons of jackshite on their laptops, and that stuff tends to run a myriad of pre- and postinstallation scripts that crap all over the file system, the launch service database, and install user and system wide agents and all sorts of other unthinkable things. Including adding themselves into the power nap wakeup list without having a real need for it. At best, the app can drain the battery, and it usually does. At worst, the app bundles an system level extension that is buggy and crashes the system when invoked. But oftentimes, such nonsense does not yield its slot in the power nap run queue easily, which meddles with the laptop going back into the sleep and results in all sorts of bizarre problems.

Enterprise software is the worst offender. Nearly every. single. one. enterprise app installs (or runs) untold amounts of crap all over the file system, and nearly each app comes nowadays with its own software update daemon that is forcibly installed into the launchd database and runs 24x7, including at the power nap time. Is there a need to run a update daemon 24x7 to check for updates multiple times a day instead adding a crontab entry to wake it up once a day? No. Is there a need to install a «helper» daemon that does nothing but phones home non-stop sending undisclosed, non-consentual telemetry (likely PII too and more)? Absolutely no.

Microsoft Office is a prime example of such an invasive pest with Citrix Workspace being one of the worst offenders I have encountered in a while. Pick apart installation bundles for either and take a look at their respective pre- and postinstall scripts. Faeces that both slap onto a working OS install have to be thoroughly scrubbed off after, and they can only be scrubbed off with a hardened spatula. I really wish all downloadable app installs could be sandboxed by default and contained to their sandboxes without being able to ever break out of them. APFS supports COW snapshots, so perhaps the installer could create a sandbox and give each a private copy of system configuration files and databases that only the app could crap into into an oblivion without having an effect on a wider system installation.*

Re: Docker on MacOS is slow and how to fix it

#115

Earlier quoted context omitted.

For many Mac is the only sensible option. There's one developer in our company that uses Linux and it's a lot of pain to setup. Mac has the best balance between coding, utility tools and "other work stuff". Windows probably on par if not more for "work stuff" but falls badly in the coding & tooling department. Linux is OK ish for coding and utility but falls behind for "other work stuff" and certainly a pain to just…

> but falls badly in the coding & tooling department. That's more perception than reality, often from people who simply don't know how to use Windows. Visual Studio, Visual Studio Code, and IntelliJ IDEA blow any Linux text editor out of the water for developer productivity. For Linux workloads there is the Windows Subsystem for Linux (WSL 2), which now even supports GUIs with GPU acceleration! Visual Studio Code can…

false. i used windows and migrate to linux (starting with ubuntu) 10 years ago. i know how it feels to help a co-worker setting up a ruby on rails project on windows. we spent it full day.

on linux, we spent no more than one hour.

those editors you mentioned are also available on linux nowadays.

if someone needs to test something on windows, there's "windows on aws" (i used it once)

Re: Docker on MacOS is slow and how to fix it

#116

Earlier quoted context omitted.

For many Mac is the only sensible option. There's one developer in our company that uses Linux and it's a lot of pain to setup. Mac has the best balance between coding, utility tools and "other work stuff". Windows probably on par if not more for "work stuff" but falls badly in the coding & tooling department. Linux is OK ish for coding and utility but falls behind for "other work stuff" and certainly a pain to just…

> but falls badly in the coding & tooling department. That's more perception than reality, often from people who simply don't know how to use Windows. Visual Studio, Visual Studio Code, and IntelliJ IDEA blow any Linux text editor out of the water for developer productivity. For Linux workloads there is the Windows Subsystem for Linux (WSL 2), which now even supports GUIs with GPU acceleration! Visual Studio Code can…

If you code in Windows and deploy on Windows, I think it's fine. Java/C#/Python/Microsoft C++ are well supported.

If you're coding in Windows and deploying on Linux, it's not ideal. Sure there's WSL2 which kinda sorta helps for a lot of day-to-day stuff. But often weird errors creep in, my favorite being the MS-DOS EOL instead of the Unix EOL, which breaks Bash scripts, leading to developers saying: "But it worked fine in MSYS!"

Re: Docker on MacOS is slow and how to fix it

#117
post #60

Funny that this came up — shameless plug: I've actually been working on a new Linux+Docker+Kubernetes solution for macOS recently! Already added quite a few improvements over existing apps including Docker Desktop, Rancher, Colima, etc: - Fast networking: 30 Gbps! vs. 150 Mbps with Docker VPNKit. Full VPN compatibility, IPv6, ping, ICMP and UDP traceroute, and half-open TCP connections. - Bidirectional filesystem sha…

Biggest question: is it backwards compatible with Docker? Docker CLI and docker-compose is used in tons of scripts. To have any change of this being adopted in a team setting it needs to be a drop in replacement.

Re: Docker on MacOS is slow and how to fix it

#118
post #91

Earlier quoted context omitted.

That's fair, but I think the value proposition is there for some :) I'm honestly not sure how pricing and licensing will work yet, but there will be some way to try it for free. Maybe something like Docker Desktop: free for personal use, license required for companies? That seems like a risky bet as an indie dev. There's also the whole question of one-time purchases vs. subscriptions. Subscriptions seem like the opti…

> Maybe something like Docker Desktop: free for personal use, license required for companies? That seems like a risky bet as an indie dev. That's how it works currently.

Yes, but I'm guessing kdragOn's legal budget is a whole lot smaller than Docker, Inc's, so the perceived risk of stealing the product would be a whole lot smaller.

Re: Docker on MacOS is slow and how to fix it

#119
post #91
post #86

Earlier quoted context omitted.

It cost money sounds like the big one

That's fair, but I think the value proposition is there for some :) I'm honestly not sure how pricing and licensing will work yet, but there will be some way to try it for free. Maybe something like Docker Desktop: free for personal use, license required for companies? That seems like a risky bet as an indie dev. There's also the whole question of one-time purchases vs. subscriptions. Subscriptions seem like the opti…

> There's also the whole question of one-time purchases vs. subscriptions. Subscriptions seem like the optimal model for this, so I'm not sure how to accommodate people who just don't like them.

My company is just large enough to require Docker Desktop licensing, and a per-seat continuous drip is too much for us. So, if you're looking to differentiate, having a buy-out option that gives permanent access to at least a range of versions would be big.

Re: Docker on MacOS is slow and how to fix it

#120
post #109
post #86

Earlier quoted context omitted.

It cost money sounds like the big one

Even after building and selling developer tools for a decade, it always surprises and enrages me to see how miserly developers are.

It's also our employers. They don't like to spend money on dev tools because the suits don't see the benefit. There's no glossy Gartner magic quadrant BS for every niche development usecase so they think they're throwing money into the fire.
Post reply on HN