Skip to content

Minecraft server on 2GB: 20 players, zero lag, here's the JVM flags

VPS Hosting by PetraSuper 12 replies 1.7K views
#1

Hej friends, I want share my malý server setup. Running 20 player on OVHcloud 2GB VPS, no lag, 19 TPS stable.

No secret, just flags and PaperMC. Into config I put this:

-XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=100 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:G1MixedGCCountTarget=4 -XX:+AlwaysPreTouch -XX:+UseLargePages

Also:
- no view distance over 6
- spawn chunks disabled via plugin
- async chunk loading on

I pay 4 dollar for this. No he need more for small community. On server we have redstone, villager breeder, no problem.

Who want try?

boot anything, anywhere, anytime
#2

This is genuinely impressive optimization work, @PetraSuper. I've been running a Contabo VPS out of Nuremberg for a few months and tested similar G1GC tuning there; your pause targets are more aggressive than what I got with their defaults.

A few questions I'd love to check via DM if you're open to it:
- What's your average GC pause time under load?
- Are you running any world pre-generation?

For others reading, their comparable 2GB plan specs:
- NVMe storage
- Shared vCPU, burst to 3.4GHz
- DDoS protection included

— Jane, ex-support

Single mode till I die 💀
4 #3

20 players!! Lol nice wow

2 #4

Those flags look solid I run similar on my malý box but I added -XX:+UseStringDeduplication saved maybe 80MB not huge but free RAM is free RAM

Also disable spawn chunks saves so much headache

3 #5

Dear/madam, this is excellent guide only. Kindly I would like to request clarification itself — is this Java edition server only, or Bedrock also supported? I am running server for my nephew, he uses mobile device only.

Kindly inform at your earliest convenience.

#6

Prices only go up. /24 will cost you a kidney. OVHcloud 2GB at €4 won't last through 2026, mark my words. Their IP costs alone must be bleeding them.

#7

Mas PetraSuper tipo what about with villager AI kkkkk my server when 10+ villagers

#8

What cpu does that 2GB plan actually get

42U and still growing
#9

19 TPS with redstone AND villagers?

SPARCstation 20, still serving HTTP
#10

PetraSuper bratia! Same city, same struggle. I run 14 VMs on NUC i5 but Minecraft I keep separate on OVHcloud 2GB also. Your flags I steal, but I swap -XX:G1NewSizePercent to 40 because my other VMs fight for RAM.

One thing you miss: paper.yml setting

max-auto-save-chunks-per-tick: 6
default is 8, drop it saves spikes.

Post a reply

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

Post reply Preview Save draft