scottyhardy / docker-wine

Docker image that includes Wine and Winetricks for running Windows applications on Linux and macOS
MIT License
893 stars 154 forks source link

Use socat with UNIX sockets over UDP on macOS #81

Open scottyhardy opened 4 years ago

scottyhardy commented 4 years ago

I’ve seen people trying to use socat on macOS with Xquartz but only on the host machine and getting the same poor performance when you run X11 over TCP directly to Xquartz with network connections enabled. I want to try using socat both within the container and on the Mac with UDP connection if possible to see if there’s any performance gain. Either way, it’ll provide a general use case for sharing any type of UNIX socket “invisibly” between the OS in a docker container and macOS.

sakurai-youhei commented 3 years ago

Just FYI And, thank you for this great project by the way!

I could get better performance by enabling one docker setting on macOS as below (Docker Desktop > Preferences > Experimental Features > Use new virtualization framework) without trying the socat.

image

I saw noticeable GUI latency on scrolling a bar of e.g. text editor before the change but it's much better now; the bottleneck in my case seemed to be some of docker components that were very CPU intensive. I hope you'd find it helpful.

My mac

scottyhardy commented 2 years ago

Hi @sakurai-youhei Thanks for your interest in my project :) I've tested out that option but I find the newer virtualization framework just thrashes my CPU, whereas hyperkit doesn't chew up much at all. I didn't find any improvement in X11 performance either.

scottyhardy commented 2 years ago

I've actually just tested installing XQuartz 2.8.1 (was using 2.7.11) and found there's a much more noticeable improvement, especially when maximising the window to a full screen. It's still a tad slow, but a bigger improvement than anything else to date