Re:ARM Mac: Why I'm Worried About Virtualization
by bmalehorn on Thursday June 25, 2020 @03:33PM
(#23644579)
I ran this on a Linux laptop - it looks like it's running qemu-user-static:
root 9934 103 0.0 125444 6664 pts/0 Rl+ 12:25 0:12 /usr/bin/qemu-aarch64-static /usr/bin/gzip
So it might be that Docker already runs a native x86_64 Linux, then uses qemu-static binary translation.
Re:ARM Mac: Why I'm Worried About Virtualization
by sirn on Thursday June 25, 2020 @04:58PM
(#23645621)
That's strange, in my experience it shouldn't have 6x slowdown. Probably might be due to several factors, but here's your test, running on my system without Docker:
Ryzen 3900X (host machine)
$ dd if=/dev/urandom bs=4k count=10k | gzip >/dev/null
10240+0 records in
10240+0 records out
41943040 bytes (42 MB, 40 MiB) copied, 1.02284 s, 41.0 MB/s
qemu-aarch64-static $ dd if=/dev/urandom bs=4k count=10k | proot -R /tmp/aarch64-alpine -q qemu-aarch64-static sh -c 'gzip >/dev/null'
10240+0 records in
10240+0 records out
41943040 bytes (42 MB, 40 MiB) copied, 3.33964 s, 12.6 MB/s
You can probably use qemu-user-static to translate x86-64-only binaries in a Linux container on an ARM machine, too, but I have never tried.
[1]: https://www.qemu.org/docs/master/user/main.html
[2]: https://www.qemu.org/docs/master/system/index.html