Swap, Memory, and Unreal Engine

  • Distro: Endeavour OS
  • DE: KDE Plasma [Wayland]
  • Memory: 32GB, 1GB Swapfile
  • CPU: Ryzen 5 5600X
  • GPU: NVIDIA Gefore RTX 3070

Hello! I am a game developer and I use Unreal Engine 5.6.1 for my day job. I have dual-booted a number of Linux distros with my windows installation for several years now, including a base Arch install, and have been tinkering with trying to start doing some daily work in Linux rather than Windows. I have gotten my team’s project opening on Fedora previously, but I have moved to Endeavour OS over the last couple days (love it, BTW!). Yesterday, I tried setting up our project on my Endeavour install. Got it launching, but my entire system froze. I tried a number of keys including REISUB, none of which worked.

Doing some reading online, I suspect my system ran out of memory, and making a swapfile seems to be the solution to memory-related system freezes. So after creating a 1G swapfile using the arch wiki’s instructions, I was able to get the editor to launch! But any time I do a memory-intensive task such as compiling shaders, the system freezes again. Only difference this time is KDE can now kill the process before the whole system siezes up.

Is the solution here to make a larger swapfile? Memory-intensive tasks like this are very common when working with large game projects, so “don’t compile shaders“ is not an option. If anyone knows something that might help, that would be wonderful!

Thanks!

I don’t know about Unreal Engine, but 1G seems very small for a swap. You could try adding more swap, or even enabling zram

1 Like

If I install Zram, should I remove the swapfile?

I use both with no problems. It should favour the zram and then use the swap (although the zram shows up as swap also).

1 Like

You could use both in combination as mentioned. I do the same too.

By default, Zram will have a higher priority than the swapfile and will be used first.

Filename				Type		Size		Used		Priority
/dev/zram0                              partition	8388604		0		100
/swap/swapfile                          file		16777212	0		-2

If you can afford some disk space, I would go for a larger swapfile too. It won’t hurt.

1 Like

Zram and a larger Swapfile (6GB) nailed it! system runs with no hitches while shaders compile in the background

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.