Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Do people still use Vagrant? Last time I tried Docker on Mac, it was painfully slow. So I kept using Vagrant, which used more disc space, but very fast, and the Intel Macbook pro fan never kicked in once like Docker did.


Containers on anything other than Linux run in a Virtual Machine. Depending on the platform, you may or may not have hardware acceleration. It's either using the software emulator (slow) or hardware acceleration. On the new M architecture, I believe Docker now supports Rosetta2 emulation via Apple's Hypervisor Framework so it is near native performance.

As far as Vagrant being faster than Docker, it's possible the qemu backend it uses was hardware accelerated and for whatever reason the Docker VM wasn't? Or perhaps you were using Docker Desktop which does take up a lot of compute capacity away? Try using the docker cli without docker desktop and see if it works better for you.


Just a nit. Docker on Windows is near native-like performance, using WSL2.

WSL2 even supports running Linux GUI applications and GPU passthrough.


WSL2 still runs in a VM so it has the performance implications of that, not that they usually end up being that significant (I have found that memory usage in WSL2 is usually ridiculously high, though).

I think the support for Linux GUI applications is achieved by running an X server on the Windows side of things.


WSL2 uses a Hyper-V virtual machine [1], which is a native hypervisor [2] and doesn't come with most of the performance costs of software VMs.

[1] https://en.wikipedia.org/wiki/Hyper-V

[2] https://en.wikipedia.org/wiki/Hypervisor#Classification


Funny thing is that most of my stuff runs faster in WSL2 than Windows because it bypasses Windows built-in virus scanner.


I don't think speed is a matter of your container engine (Docker vs Vagrant) but what virtual machine you are using. I usually use Docker without any virtualization since I'm running linux containers on linux. I'm guessing when you say Vagrant, your're probably using VMware or something. I don't know what Docker on mac might be using since I avoid using mac.


I guess when I mentioned slow, it uses lots of resources on parent OS. Yes, it's Virtual Box I believe.


Yeah, so it's Virtual Box using your resources, not Vagrant or Docker. You might want to read up a bit on how containers work -- on a unix system, assuming same cpu architechture (so you don't need a VM) and filesystem that supports overlays, containers have barely any overhead in terms of system resources. You could have a thousand containers running on your machine and be fine. VMs, on the other hand, have pretty serious overhead.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: