3 ms·
Virtualization and even running a guest kernel and OS isn't 5x expensive on the CPU, so the problem is not virtualization per se. Perhaps the problem is Darwin
by jlokier 6y ago
Virtualization and even running a guest kernel and OS isn't 5x expensive on the CPU, so the problem is not virtualization per se.
Perhaps the problem is Darwin.
- yjftsjthsd-h 6y agoI know it's not bad on CPU, but I thought it took more of a hit on I/O? Granted, I suspect that some of this is indeed some issue with Darwin itself, or at least poor integration with it.
- jlokier 6y agoI agree, I/O can be pretty expensive. It depends quite a lot on the kind of I/O and how it's implemented, so design choices matter. If there's a full Linux kernel inside the VM, then you may as well do I/O inside the VM as well, using something like virtio and a ringbuffer of async block device commands to the host, or at least batching them. That will be quicker than relaying every POSIX file operation synchronously to the host, because the number of VM exits is much lower in the former case.
- arp242 6y agoDocker abstracts and re-implements a lot of the filesystem and IO stuff; almost all of the issues (often outright bugs) I've had with Docker on Linux are related to that, too.