mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2026-01-11 21:10:25 +01:00
Allocating more CPU cores #70
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sanderfoobar on GitHub (Oct 1, 2020).
Starting with:
Does not start the VM. QEMU args (truncated):
CORES=4works.Just wondering, is it possible to allocate more cores?
@sickcodes commented on GitHub (Oct 6, 2020):
I actually don't know the SMP, cores, sockets situation. I'll play around with it in virt-manager and come back with more info.
Someone else, or a QEMU whizz, would be better to answer this than me.
@iedwin commented on GitHub (Nov 23, 2020):
You could try -smp 16,cores=16,threads=1,sockets=1 and it means the vm will use 16 phsical CPU cores, 16 logic cores. I managed to run macOS vm with the paramter above. I also tried -smp 32,cores=16,threads=2,sockets=1 but macOS stuck after running several hours and cannot recover by itself. I guess qemu/clover may not be able to work well with the threads parameter greater than 1.
@jpmorrison commented on GitHub (Oct 15, 2021):
I ran Passmark (cli) benchmark on the Linux host and the macos guest and saw big improvements with SMP/threads.
After I set SMP=8 and threads=2, with default CORES=4 Passmark reported twice the guest performance. I don't know if threads is needed or if qemu can figure that out automatically from SMP.
Host cpu is pretty high still pretty high (10%) even when the guest is idle:
Load Avg: 0.36, 0.49, 0.53 CPU usage: 0.23% user, 0.59% sys, 99.16% idle SharedLibs: 448M resident, 76M data, 59M linkedit.This has been pretty consistent no matter how many CPUs the guest has.
@sickcodes commented on GitHub (Oct 18, 2021):
Thanks for the tip @jpmorrison, do you want to add your findings to the CPU in the README or create a more detailed bit? I'd be happy to later this week, unless you would like to add some notes :)
@jpmorrison commented on GitHub (Oct 19, 2021):
Here's my Launch.sh (as-is). I've learned a lot from @sickcodes quickemu and various qemu/kvm pages.
CPU
VirtIO
Guest
sudo mount_9p NFSfor the public file sharing. Host side permissions should be 777. This works and seems faster than using a network share mounted from the guest. Need to see if this can be automated through the qemu guest agent.cat /dev/tty.com.redhat.spice.0in the guest sets seamless mouse in spice remote-viewer and echoes mouse movement. Interesting but currently useless until vdagent is ported./dev/tty.org.spice-space.webdav.0spice file sharing with freedesktop phodav - need to look at porting.mount_webdavis already in Catalinaapple-guest-set-remote-login apple-working-directory apple-stdinand other stuff I assume are Apple extensions.AppleVirtIOConsole IOSerialBSDClientmakes me wonder about connecting another virtioserial for console. Useful for kernel debugging?USB redirection (Spice)
adb shellqemu-system-x86_64: usb-redir error:Launch.sh