satisfactory-server-aws icon indicating copy to clipboard operation
satisfactory-server-aws copied to clipboard

m5a.large may not be enough for update 6

Open dsedivec opened this issue 3 years ago • 3 comments

I'm getting OOM kill upon starting a new game as of tonight on experimental branch:

[ 2130.179935] FAsyncLoading invoked oom-killer: gfp_mask=0x100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=0
[ 2130.179946] CPU: 1 PID: 10697 Comm: FAsyncLoading Not tainted 5.13.0-1029-aws #32~20.04.1-Ubuntu
[ 2130.179951] Hardware name: Amazon EC2 m5a.large/, BIOS 1.0 10/16/2017
[...]
[ 2130.180224] Free swap  = 0kB
[ 2130.180225] Total swap = 0kB
[ 2130.180226] 2031496 pages RAM
[ 2130.180227] 0 pages HighMem/MovableOnly
[ 2130.180228] 60316 pages reserved
[ 2130.180229] 0 pages hwpoisoned
[ 2130.180230] Tasks state (memory values in pages):
[ 2130.180231] [  pid  ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name
[...]
[ 2130.180402] [  10654]  1000 10654  2594712  1889023 18378752        0             0 UE4Server-Linux
[ 2130.180412] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/system.slice/satisfactory.service,task=UE4Server-Linux,pid=10654,uid=1000
[ 2130.180457] Out of memory: Killed process 10654 (UE4Server-Linux) total-vm:10378848kB, anon-rss:7556092kB, file-rss:0kB, shmem-rss:0kB, UID:1000 pgtables:17948kB oom_score_adj:0
[ 2130.653030] oom_reaper: reaped process 10654 (UE4Server-Linux), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB

Assuming we still have 4 KiB pages that's 1,889,023 pages * 4096 bytes = 7,737,438,208 bytes of RAM—and I didn't even get to enter the game.

I made a swap file via:

dd if=/dev/zero of=/swap bs=1M count=1024
chmod 0600 /swap
mkswap /swap
swapon -a /swap

I can now enter the game, but memory does look a bit dire to me:

# free -h
              total        used        free      shared  buff/cache   available
Mem:          7.5Gi       6.9Gi       249Mi       0.0Ki       413Mi       416Mi
Swap:         1.0Gi       1.0Gi       0.0Ki

I'm not exactly sure what action should be taken here. Ride it out and things will be fine? Switch to r5a.large? Close this issue and wait for experimental to hit early access? :)

Edit: I forgot to add, thank you to the people who put this together! It basically worked, though my default VPC turned out to be borked in a very special way that required me to nuke and recreate it before npx cdk deploy would run. It's worked like a charm since then.

dsedivec avatar Jun 15 '22 01:06 dsedivec

Experiencing the same issue with Update 6. Used the create game function in the games server manager, however when joining the satisfactory.service would crash and the game would show a timeout error. I didn't check the memory usage on m5a.large however, upgrading the instance to an r5a.large server worked and I was successfully able to get into the game. I also added a swap file like @dsedivec suggested just in case as time goes on the game needs even more space.

              total        used        free      shared  buff/cache   available
Mem:           15Gi       7.7Gi       150Mi       0.0Ki       7.6Gi       7.4Gi
Swap:         1.0Gi          0B       1.0Gi

Abbrahan avatar Jun 16 '22 03:06 Abbrahan

The recent update 6 experimental video by Snutt does call out that there are some issues for update 6 on dedicated server: https://www.youtube.com/watch?v=acZOxaTkcCY. Maybe they will address the memory issues. It might be good for y'all to report or upvote your experiences here: https://questions.satisfactorygame.com/search?category=dedicated%20servers&date=All%20Time

feydan avatar Jun 18 '22 22:06 feydan

Thanks feydan. Existing posts that appear relevant include:

  • https://questions.satisfactorygame.com/post/62ae0465ca608e080351595f
  • https://questions.satisfactorygame.com/post/62a8e5a2ca608e0803513776
  • (maybe) https://questions.satisfactorygame.com/post/62aa060eca608e0803513e8e

dsedivec avatar Jun 19 '22 18:06 dsedivec

More than two years later, on the cusp of the 1.0 release, I imagine this is no longer relevant. :)

dsedivec avatar Sep 03 '24 05:09 dsedivec