~$ free -h
total used free shared buff/cache available
Mem: 7.4Gi 4.3Gi 2.2Gi 683Mi 2.5Gi 3.1Gi
Swap: 31Gi 1.6Gi 29Gi
I have 8G of actual RAM, the 16G swapfile that asahi seems to create by default & a 15.5G swap partition. Steam says it only has access to about 4.2G of RAM. I’m not a heavy gamer and can run some games in steam, but can I give steam access to the swap partition?
The swap file is used by the kernel to swap pages out of RAM when memory pressure gets high enough that the working set cannot fit into available RAM. Not all memory pages can be swapped as they are critical to the operation of the kernel and operating system. Actively used memory pages must still reside in RAM and cannot be swapped out.
In the end, applications themselves don’t directly access the swap file.
The only real option is more physical RAM, which is unfortunately difficult to do on Apple computers.
muvm defaults to 80% of physical RAM. It can use the swap file and the VM RAM will be swapped out if necessary, but the total memory usage of the VM is limited to that number. You could increase it (muvm --mem), but I would highly advise you not to. 80% is already very high and precludes running large applications outside the VM, and this number does not count VRAM, which cannot be swapped out. Increasing the allocation just makes it more likely that your machine will OOM.