Linux: Wine's server tmpmaps live in /tmp (tmpfs) and consume RAM; bind-mount them to disk #419
Loading…
Reference in a new issue
No description provided.
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?
Imported from brcly/TuxBox. Originally posted by JoshRob297 on 2026-11-28T21:53:17Z.
Summary
On Linux, Wine's server directory lives in
/tmp(/tmp/.wine-$UID/server-*), and on most distributions/tmpis tmpfs, so everytmpmap-*file the title maps is RAM. A GTA VI port using Wine 11.22 on a 30 GB machine mapped 20,217 tmpmap files (~22 GB) during the front-end load; with/tmpat its 16 GB tmpfs size the allocation fails and the process dies (exit 5, or an oom-kill from systemd-oomd).This is not the runtime's arena and not the title's own allocations:
freeshows the growth under shared,/tmpfills up, and the process dies under pressure. It reads as a null write in some runs because the title's watchdog fires after the stall.Measurement (Intel Meteor Lake iGPU, Mesa ANV 26.2.6, Wine 11.22, 30 GB RAM)
Before:
The tmpmaps are deleted-but-open files, so
dureports 0 while the pages stay in RAM.After binding that directory to a disk-backed path:
Free RAM went from ~2 GB to ~26 GB, and the same run reached the front-end instead of dying.
Notes
/tmp/.wine-%u; it ignoresTMPDIR/XDG_RUNTIME_DIR, and it rejects a symlink withwineserver: /tmp/.wine-1000 is not a directory. The bind mount is the only fix without changing Wine.0700:wineserver: /tmp/.wine-1000 must not be accessible by other users./etc/fstab:/home/<user>/wine-server /tmp/.wine-1000 none bind 0 0TMPDIRorXDG_RUNTIME_DIRfor the server directory; worth a bug report there too.Might be worth a line in the Linux/Proton docs, since it shows up as memory pressure and as a GPU-adjacent crash rather than as a temp-directory problem.