Skip to content

Game server hosting: Valheim on 2GB VPS?

VPS Hosting by prague1983 7 replies 499 views
#1

Running a Valheim dedicated server on a 2GB Contabo VPS because I'm a CHEAPSKATE and my friends are freeloaders. Debian 12, 1 vCPU, the whole budget special.

Worked fine for 3-4 players. Then we hit 6 and oh boy. Lag spikes every 30 seconds, rubberbanding into the ocean, one guy's entire base vanished after a "scheduled" restart.

Checked dmesg.

[ 4821.391] Out of memory: Killed process 1847 (valheim_server.x)

OOM killer doing OOM killer things. World save got corrupted because the process died mid-write. 40 hours of Viking architecture = redirected to /dev/null.

Just use more RAM? Skill issue on my end for sure. But has anyone actually made this work on 2GB or is this a fool's errand?

oops: 0000 [#1] SMP
4 #2

There was a time you ran MUDs on 640K and you were grateful :-)

2GB r plenty if you dont use bloated modern OS. Try OpenBSD or maybe you need a co-processor? My 486DX2 handled 16 players no lag. Skill issue indeed.

#3

Dear Sir/Madam,

Kindly note that 2GB RAM is insufficient only for Valheim server with multiple players. The world save corruption itself is indicating memory pressure. You may kindly consider upgrading to 4GB plan or using swap file with zram. The deduplication is not recommended for this purpose.

Please to check your cgroup limits also.

Thank you.

3 #4
priya said:
Check your cgroup limits

This. Contabo's budget line is OpenVZ with oversold memory and no swap. The virtualization tax here is brutal—your 2GB isn't even guaranteed 2GB.

KVM with proper cgroup limits would OOM gracefully or hit swap. OpenVZ just lies to you until the kernel panics.

Check if you're actually on KVM or OpenVZ:

systemd-detect-virt

virsh list --all | wc -l: 47
#5
prague1983 said:
World save got corrupted

Classic write-without-fsync, process gets redirected by OOM, bytes in flight piped to nowhere. No atomic rename, no journal. EOF.

| dedupe your grief: use tmpfs for active world, cron rsync to disk
| or accept 2GB as hard limit and pipe player count accordingly
| else: pay more, cry less

/dev/null: full of good ideas
#6
  • 2x Intel Xeon E5-2680v4
  • 128GB DDR4 ECC
  • LSI 9211-8I HBA
  • 6x 4TB HGST NAS drives, RAIDZ2

ZFS snapshots every 15 minutes. Corruption? Roll back. The VPS is toy storage. Real servers have spinners.

zfs send | zfs receive. repeat.
#7

Contabo actually give u 2GB usable or is it oversold

#8

OOM killer is the real villain here

Post a reply

You need an account to reply. Log in or register to join the conversation.

Post reply Preview Save draft