Recent Discussions

Server growing way faster than expected. How to optimize tps at ~20 or more players on Fabric?

Unanswered
Zeph posted this in #questions
Messages16 messages
Views0 views
Hey everyone!

Opened my first server this last Friday, made a TikTok to promote it and... boom. Getting way more people than I expected. I was aiming for ~10 player but it looks like we'll be closer to ~20 with more applications coming in every day.

This is great! But the server TPS gets real spiky. We already had to up from 6GB to 8GB but the TPS still spikes pretty hard and often when we get over 18ish players. I'm trying to find ways to optimize the server without affecting gameplay since I want the server to be as close to vanilla as possible.

## Server Details:
Server Host: Modrinth - I've made a mod or two so I already had a good experience with them, and most people seem to like their hosting
CPU: Modrinth says 4 Shared CPUs (Bursts up to 8 CPUs), Spark shows AMD EPYC 4584PX 16-Core Processor
Memory: 8 GB RAM 2 GB Swap
Storage: 64 GB SSD
World Border: 10k radius (chunky pre-genned)

## What I have done:
- Used Chunky to pre gen all overworld and nether chunks
- Lowered View Distance to 7 in server.properties
- Lowered Simulation Distance to 5 in server.properties
- Downloaded mods like Krypton, C2M, FerriteCore, Lithium, and Carpet (all with very little configuration, probably what I need to do)

## What I suspect
- I likely need to configure the performance mods more, but am unsure where to start and what changes can be made without breaking vanilla mechanics.
- carpet-tis-addition is the top Mod in the Spark profile. This could be just because carpet is aggressively optimizing? But I'm pretty sure you have to apply changes to carpet first, which I have not done yet.

Obligatory spark data included from the peak player count last night when the tps spikes were occuring
peakPlayerCount.sparkprofile
@Zeph Hey everyone!

Opened my first server this last Friday, made a TikTok to promote it and... boom. Getting way more people than I expected. I was aiming for ~10 player but it looks like we'll be closer to ~20 with more applications coming in every day.

This is great! But the server TPS gets real spiky. We already had to up from 6GB to 8GB but the TPS still spikes pretty hard and often when we get over 18ish players. I'm trying to find ways to optimize the server without affecting gameplay since I want the server to be as close to vanilla as possible.

## Server Details:
Server Host: Modrinth - I've made a mod or two so I already had a good experience with them, and most people seem to like their hosting
CPU: Modrinth says 4 Shared CPUs (Bursts up to 8 CPUs), Spark shows AMD EPYC 4584PX 16-Core Processor
Memory: 8 GB RAM 2 GB Swap
Storage: 64 GB SSD
World Border: 10k radius (chunky pre-genned)

## What I have done:
- Used Chunky to pre gen all overworld and nether chunks
- Lowered View Distance to 7 in server.properties
- Lowered Simulation Distance to 5 in server.properties
- Downloaded mods like Krypton, C2M, FerriteCore, Lithium, and Carpet (all with very little configuration, probably what I need to do)

## What I suspect
- I likely need to configure the performance mods more, but am unsure where to start and what changes can be made without breaking vanilla mechanics.
- carpet-tis-addition is the top Mod in the Spark profile. This could be just because carpet is aggressively optimizing? But I'm pretty sure you have to apply changes to carpet first, which I have not done yet.

Obligatory spark data included from the peak player count last night when the tps spikes were occuring
highly suggest installing servercore and configuring it itll help with mobcaps that you have a high amount of.

most of the lag is coming from libpthread which im not exactly sure what is @Connecticut Warbler would you have any idea on this one?

The rest is entities and server chunk management which you can fix but mainly the entities, for the chunk stuff you need to beware what performance mods you add since most of the stuff touching chunks can screw each other over and cause more lag then less lag

If modrinth allows you to edit your server arguments highly suggest changing it to https://flags.sh then what you have right now.

Also for 6gb thats pretty nice but you will fill up fast, highly suggest either upgrading the ram or switching hosts to someone that gives you more ram for roughly the same performance
image.png
the cpu is right on the money tho, pretty nice single thread score's and not bad base clock speeds
gotcha
As for the 6GB, it's weird. This Spark Profile was taken after I had upgraded to 8GB. Spark still shows 6GB but Modrinth shows 8GB... very odd and I'm not sure who to trust.
@Tamz you have xmx6138 or something, so you arent using the full ram amount
That's what I was thinking. I checked the startup command in Modrinth which shows as
java -Dterminal.jline=false -Dterminal.ansi=true -Xms512M -Xmx8192M -jar fabric-loader-1.21.5-0.16.13.jar --nogui

Could be possible that Modrinth is just showing this command, but not actually applying it... Hm
it could be a old spark report then
restart your server so itll be there exactly
Also thanks a ton for your suggestions already. I really appreciate it.
np
there is 1 mod that you can get thatll wipe out most entity lag but its behind a patreon, someaddon's performant mod
@Tamz there is 1 mod that you can get thatll wipe out most entity lag but its behind a patreon, someaddon's performant mod
Thanks for the recommendation! I'll check it out!

Also you were right, I had restarted the server after upgrading to 8GB and ran that report, but it probably didn't have time to fully apply. Spark now shows 8GB.
noice
Loading...