Recommendations on performance tuning #21

Open
opened 2025-12-28 23:21:18 +01:00 by adam · 8 comments
Owner

Originally created by @anh-collab on GitHub (Jun 7, 2020).

Thanks for this project! This is extremely awesome and it allows many people like me who cannot Hackintosh to enjoy the benefits of MacOS.

However, I do want to explore more on the performance potential of this setup. I am running a Docker in Ubuntu 20.04 DDE and experiencing some lags. While it's understandable that VMs would always have a performance penalty, is there anything we could do to optimize the performance of this?

For example, tuning QEMU + KVM, using a specific Linux distro that optimizes Dockers (Alpine?), or maybe turning off the host's GUI and processes somehow?

I am new to this whole virtualization thing so pardon me if this sounds unreasonable. Nevertheless, I would love to learn more about the potentials of this project!

Originally created by @anh-collab on GitHub (Jun 7, 2020). Thanks for this project! This is extremely awesome and it allows many people like me who cannot Hackintosh to enjoy the benefits of MacOS. However, I do want to explore more on the performance potential of this setup. I am running a Docker in Ubuntu 20.04 DDE and experiencing some lags. While it's understandable that VMs would always have a performance penalty, is there anything we could do to optimize the performance of this? For example, tuning QEMU + KVM, using a specific Linux distro that optimizes Dockers (Alpine?), or maybe turning off the host's GUI and processes somehow? I am new to this whole virtualization thing so pardon me if this sounds unreasonable. Nevertheless, I would love to learn more about the potentials of this project!
Author
Owner

@sickcodes commented on GitHub (Jun 7, 2020):

Thanks for your comments!

I just had a look at some of the packages for alpine and it could be done.

When I started writing the Dockerfile it was a lot bigger. Removing the tun/tap bridge networking and just keeping it simple, it reduced the packages.

Docker and virt-manager version both run same for me.

I'd say swithing to Alpine wouldn't make a big difference currently, Arch docker starts with zero processes anyway: docker run -it archlinux ps aux. If someone else has any tips about base systems, would be great to hear.

You can read about the passthrough notes and options at Dhiru Kholia's repo which this Dockerfile "stands on the shoulders" of: https://github.com/kholia/osx-kvm

@sickcodes commented on GitHub (Jun 7, 2020): Thanks for your comments! I just had a look at some of the packages for alpine and it could be done. When I started writing the Dockerfile it was a lot bigger. Removing the tun/tap bridge networking and just keeping it simple, it reduced the packages. Docker and virt-manager version both run same for me. I'd say swithing to Alpine wouldn't make a big difference currently, Arch docker starts with zero processes anyway: `docker run -it archlinux ps aux`. If someone else has any tips about base systems, would be great to hear. You can read about the passthrough notes and options at Dhiru Kholia's repo which this Dockerfile "stands on the shoulders" of: https://github.com/kholia/osx-kvm
Author
Owner

@anh-collab commented on GitHub (Jun 8, 2020):

You can read about the passthrough notes and options at Dhiru Kholia's repo which this Dockerfile "stands on the shoulders" of: https://github.com/kholia/osx-kvm

Thanks! Just a quick question tho: I cannot figure out how to pass my Meta/Super key or command shortcuts like Ctrl + Tab to OSX. Do you have any idea? Should I make this a separate issue?

@anh-collab commented on GitHub (Jun 8, 2020): > You can read about the passthrough notes and options at Dhiru Kholia's repo which this Dockerfile "stands on the shoulders" of: https://github.com/kholia/osx-kvm Thanks! Just a quick question tho: I cannot figure out how to pass my Meta/Super key or command shortcuts like Ctrl + Tab to OSX. Do you have any idea? Should I make this a separate issue?
Author
Owner

@sickcodes commented on GitHub (Jun 8, 2020):

I don’t know the keyboard combos but you can play around on the host using xdotool.

I can’t do much even with the virt manager version.

If you must send that key, see if you can find a key code for super meta on xdotool.

https://sick.codes/paste-clipboard-linux-xdotool-ctrl-v-terminal-type/

https://askubuntu.com/questions/695017/why-does-my-xdotool-key-command-not-work

The VNC version might be better for key presses. Sometimes my one flips the caps lock, sometimes it never stops typing

@sickcodes commented on GitHub (Jun 8, 2020): I don’t know the keyboard combos but you can play around on the host using xdotool. I can’t do much even with the virt manager version. If you must send that key, see if you can find a key code for super meta on xdotool. https://sick.codes/paste-clipboard-linux-xdotool-ctrl-v-terminal-type/ https://askubuntu.com/questions/695017/why-does-my-xdotool-key-command-not-work The VNC version might be better for key presses. Sometimes my one flips the caps lock, sometimes it never stops typing
Author
Owner

@Calinou commented on GitHub (Jun 8, 2020):

I think a macOS VM/container will always feel slow unless you can get GPU acceleration to work. Tuning QEMU or making the container smaller won't help with that. Unfortunately, it's very difficult to get working GPU acceleration in a macOS VM (if even possible nowadays).

@Calinou commented on GitHub (Jun 8, 2020): I think a macOS VM/container will always feel slow unless you can get GPU acceleration to work. Tuning QEMU or making the container smaller won't help with that. Unfortunately, it's very difficult to get working GPU acceleration in a macOS VM (if even possible nowadays).
Author
Owner

@sickcodes commented on GitHub (Jun 8, 2020):

Thanks for the comments @Calinou. I tried to passthrough my GPU into the container but I have an AMD Laptop GPU that isn't compatible (attempted a few months ago).

GPU pass-through to the container is certainly possible, I believe trivial for AMD GPU users, someone could try https://github.com/kholia/OSX-KVM/blob/master/notes.md and if it's all good we can add the option.

@sickcodes commented on GitHub (Jun 8, 2020): Thanks for the comments @Calinou. I tried to passthrough my GPU into the container but I have an AMD Laptop GPU that isn't compatible (attempted a few months ago). GPU pass-through to the container is certainly possible, I believe trivial for AMD GPU users, someone could try https://github.com/kholia/OSX-KVM/blob/master/notes.md and if it's all good we can add the option.
Author
Owner

@askz commented on GitHub (Jun 8, 2020):

Any thoughts on increasing virtual disk throughput ? I'm running on NVMe and can't get more than ~30Mo/s of disk io in the vm..

@askz commented on GitHub (Jun 8, 2020): Any thoughts on increasing virtual disk throughput ? I'm running on NVMe and can't get more than ~30Mo/s of disk io in the vm..
Author
Owner

@sickcodes commented on GitHub (Jun 8, 2020):

Im adding all sorts of new features right now

@sickcodes commented on GitHub (Jun 8, 2020): Im adding all sorts of new features right now
Author
Owner

@felipeborba-dev commented on GitHub (Jul 10, 2020):

@sickcodes I have an RX 580, I can do the tests

@felipeborba-dev commented on GitHub (Jul 10, 2020): @sickcodes I have an RX 580, I can do the tests
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#21