Wine synchronization methods - zhliau/fika-headless-docker GitHub Wiki

This image supports enabling esync, fsync, and ntsync alternative synchronization methods with Wine. These methods can potentially improve performance in the dedicated client. To enable them, set one of either NTSYNC, FSYNC, or ESYNC environment variables to true. If none of these env vars are set, this image will fall back to the default wineserver based sync.

NTSYNC

[!CAUTION] As of image version v2.2.0, ntsync appears to be broken due to a commit in the wine-tkg repo used to build wine with ntsync support. Please use the other two sync methods until this is resolved.

Kernel level implementation of Windows NT synchronization primitives. The latest and potentially highest performing sync method. Takes precedence over all other sync methods.

  • Requires ntsync support in the host kernel. Make sure you have ntsync support either by installing a kernel module (on Arch there is a kernel module for it pacman -S ntsync-dkms) or using a kernel compiled with ntsync.
  • Mount the /dev/ntsync device in the container
  • Set the NTSYNC env var to true in the container When you start the container, watch the wine.log in the client directory. You will see the line wine: using fast synchronization if you are successfully using ntsync.
services:
  fika_dedicated:
    image: ghcr.io/zhliau/fika-headless-docker:latest
    # ...
    environment:
      # ...
      - NTSYNC=true
    devices:
      - /dev/ntsync:/dev/ntsync

FSYNC

Futex based sychronization. Takes precedence over ESYNC.

Requires linux kernel version >= 5.16. Check compatibility via kernel syscall availability with cat /proc/kallsyms | grep futex_waitv.

ESYNC

Eventfd based synchronization.

Check compatibility by ulimit -Hn. If this value is less than 524288, you need to increase your system's process file descriptor limit. See this troubleshooting tip.