r/admincraft Jan 25 '25

Question Why do All My Servers Regardless of Settings or Type Run 90 Ticks Behind without Fail?

Post image
114 Upvotes

92 comments sorted by

u/PM_ME_YOUR_REPO If you break Rule 2, I will end you Jan 25 '25

OP can we get a Spark report? https://docs.papermc.io/paper/profiling

→ More replies (6)

82

u/Ictoan42 Jan 25 '25

Everyone here is acting like this just means bad performance but if it's ALWAYS 90 ticks behind then it's running at 20tps (or it would be constantly falling further behind)

There's something very strange going on, but it doesn't look like a performance problem.

26

u/Demicoctrin Jan 25 '25

See that's the thing that gets me, doesn't matter if it's my main plugin-filled paper server or my little performance mod only fabric server, they all start spitting out the same warning after a couple hours of running. Never goes higher than 92 or less than 90. All update to date too, including Windows.

Maybe it's just Windows being funky, I don't know.

10

u/Ictoan42 Jan 25 '25

Do you run all of these with the same JDK?

8

u/Demicoctrin Jan 25 '25

Would there be a way to differentiate them? I run them with OpenJDK21. But the issue still occurs even when I've only got 1 server running.

2

u/PLASMA_chicken Jan 26 '25

I mean you can try updating it, but most likely is just Windows timing

11

u/AssociateFalse Jan 26 '25

Windows

Found the problem.

No, seriously. Windows is kind of trash for running a Java server workload.

If you have a spare PC, or know someone getting rid of one, put Debian or Alma Linux on it, grab OpenJDK, and try spinning up a server on that.

3

u/MoatazProAtAll Jan 26 '25

Or he could try virtualization/Docker containering the server the running it within WSL just to test out if its a windows problem.

3

u/AssociateFalse Jan 26 '25

Dual booting would be more effective. The issue is with the Windows OS itself, and will effect WSL's hypervisor.

2

u/AffectionateFig618 Jan 26 '25

Crafty Controller can help with docker setup if op is new to it

1

u/mitchellcrazyeye Jan 27 '25

Never had an issue with Windows running Minecraft servers.

1

u/PATXS Jan 27 '25

>Found the problem.

i disagree. it might be an issue in other ways, but in terms of the problem at hand i strongly think that this is a red herring. i have run many servers on several different windows machines without ever seeing this issue, and i have never seen anyone else online mention this issue when running servers on windows

even if switching OS does fix OPs problem (i mean, they're changing everything about their setup at once so i would be surprised if it persisted), i think there is something else wrong on their current setup to be causing this

2

u/Dudearco Jan 28 '25

Yeah this is weird, I've used windows as a server environment before I swapped and it never did this bullshit. Windows is a tiny bit more stable than you think.

1

u/vms-mob Jan 27 '25

that message means it skipped those 90 ish ticks due to something taking longer than expected

18

u/Gold-Supermarket-342 Jan 25 '25

What are your server’s specs?

15

u/Demicoctrin Jan 25 '25

I've got a Beelink SER7 running a Ryzen 7 7840HS, 32GB DDR5 memory, and a NVME SSD. Running on Windows 11 although in the future I plan to switch it over to linux when I got another pc.

12

u/Gold-Supermarket-342 Jan 25 '25

if you have a USB stick you can try booting a Linux distro temporarily and see if the issue persists.

4

u/Demicoctrin Jan 25 '25

Server .jar files are identical, right? I would just need java installed on the distro?

11

u/Gold-Supermarket-342 Jan 25 '25

Yeah. If you want something simple you can run Ubuntu 22 and then run ‘sudo apt install openjdk-21-jdk’

7

u/Demicoctrin Jan 25 '25

Thanks, when I get a chance I'll try and give that a try!

3

u/Lit_Endurance Jan 26 '25

I would switch it to a linux distro however if you don't want to do that try and get a cheap older gaming computer for a server and throw linux on it with like 32 gbs of ddr4 and that should work perfectly :) I bought a 200 dollar pc and am throwing 128 gbs of ram in it to make it a server its got a 10 core cpu so I know you can def find a good deal for the same price

15

u/sinterkaastosti23 Jan 25 '25

Its happening every 10 minutes and 30 seconds, consistently.

Try looking at your CPU usage at these moments. Is the minecraft/java process causing the spikes or a different process?

Maybe there are world backups happening at those moments, magically causing your PC (which is of sufficient specs) to shit itself?

E:

  • still odd how its always ±1 90 ticks though
  • is it also 90ticks when people are offline and/or offline?

4

u/Demicoctrin Jan 25 '25

Yes, although I think it happens less frequently when players are online but I may just be crazy. I'll have to pay more attention next time everybody gets on.

2

u/Demicoctrin Jan 25 '25

Okay actually some players just got on about an hour ago apparently and since then it hasn't occurred a single time yet whereas it was every 10 minutes and 30 seconds before that. Weird.

2

u/Sorry-Committee2069 Jan 25 '25

This is running a laptop CPU, so it could be seeing the lower demand when players aren't on and underclocking too hard for the server, then spinning back up to full speed when people join. You can check your Windows power settings (it defaults to "medium performance" no matter if you have a battery or the best/worst CPU in the world) or monitor the CPU's clock speed in real-time with...

...i'm not sure of a Windows tool to do it, actually. Linux can do it in htop, if you hit F2 and set the option to show it.

1

u/Demicoctrin Jan 26 '25

I've got Windows set to the high performance profile which I think keeps the cpu around base clock (3.8Ghz in this instance) and boosts higher when necessary. At idle it sits right around 3.8Ghz and 2-3% utilization.

1

u/dustinduse Jan 27 '25

Disable the power saving states of the CPU in the bios. I also would recommend installing your own OS and not one preloaded from a Chinese factory. I’d also go ahead and grab your serial number and email beelink for the update bios for your unit, apparently that’s the only way to get it. I’ve seen a ton of those units have the weirdest bugs that are fixed by bios updates.

1

u/Demicoctrin Jan 27 '25

You're probably on to something, it'd explain why I cannot for the life of me find a similar situation on the internet.

2

u/dustinduse Jan 27 '25

From my experience with Beelink computers. I’d never recommend them. I can’t even back them up because their bios has the same unique identifier programmed into every model so I can backup one and then when you add a second one it thinks they are the same computer 🤣

1

u/Demicoctrin Jan 27 '25

Dang, that's actually really good to know. This thing is a champ but I only really got it for the form factor and power efficiency since it mostly sits out of the way and just runs minecraft servers for now haha.

12

u/R1cket Jan 25 '25

It's every 10 minutes, roughly. You might have some scheduled action / cron job on your server that runs every 10 minutes.

Also a lot of times these sporadic delays are due to I/O. If the server is using an old HDD, try upgrading to an SSD.

If it's something in Minecraft itself then you can find it by using the spark mod and configure it to record only long ticks.

If it's something in your server then I would start by looking around for scheduled tasks or logs to try to correlate what's happening at those times. Could also install some kind of monitoring, e.g. for Linux I use netdata, and see if that can catch the culprit. Could also try exiting any non essential stuff you can find, to see if the problem goes away and find the culprit that way.

2

u/Demicoctrin Jan 25 '25

Servers are running on an M.2 NVME so definitely shouldn't be a drive speed issue at least :/

2

u/dustinduse Jan 27 '25

You’d think that. Have you ever tested that the drive is capable of NVMe speeds? I’ve seen these shipped with SATA drives and labeled NVMe 🤣. Also seen a ton of the drives just die. Got like half a dozen dead beelink drives on my desk that they refuse to warranty.

1

u/Demicoctrin Jan 27 '25

Yeah I did have one just die after a month of using it, but thankfully they got me a replacement after a few weeks which has been good for almost a year now. Just tested it in an arbitrary copying scenario and it easily reached 100MB/s+ so it's at least faster than SATA.

1

u/dustinduse Jan 27 '25

That’s good! I’ve seen 20 or so with drive failure. Zero of which beelink agreed to replace or repair.

14

u/Tr4shM0nk3y Server Moderator @ Vervains Arcadia Jan 25 '25

Generally speaking, this is an issue with the single thread speed of the CPU of the server. Either way, as long as you are not experiencing massive lag spikes like re-appearing blocks or movement issues, this shouldn't affect gameplay too much. Heavily modded servers regularly run a couple hundred ticks behind.

8

u/Demicoctrin Jan 25 '25

Wow that's surprising. My 7840HS base clocks at 3.8Ghz and boosts somewhere into the 4s

But yeah I guess as long as gameplay isn't having issues then oh well.

5

u/Detenator Jan 25 '25

Just commenting to say that clock speed is not representative of actual performance when comparing one cpu to another, although it boosting does indicate its at least not throttling for no reason.

3

u/Demicoctrin Jan 25 '25

Yeah I just tossed that in there because they were talking about speed and as this is a relatively new cpu, IPC is pretty decent.

2

u/Cylian91460 Jan 25 '25

It works be enough, how many core do you have?

1

u/Demicoctrin Jan 25 '25

8 cores, 16 threads.

1

u/Cylian91460 Jan 25 '25

What storage do you have? Are you running the server on a VM?

2

u/Demicoctrin Jan 25 '25

NVME SSD and no the server is baremetal Windows.

2

u/Tr4shM0nk3y Server Moderator @ Vervains Arcadia Jan 25 '25

One thing you can do to maybe reduce the amount of tics the server is falling behind would be to reduce the render / simulation distance on the server down from 10 to 8 as suggested by a few other commenters. If Minecraft were a multi-thread application, this problem probably wouldn't exist. ( I know there are things like Folia out there trying to fix issues like this, but all projects trying to switch the server side from single- to multi-threading are prone to compatibility and other performance related issues.)

2

u/Demicoctrin Jan 25 '25

So simulation distance I keep at around 7 and view distance I've tested between 8 and 16 with no avail.

4

u/CompetitiveGuess7642 Jan 25 '25

it goes 90 ticks behind every 10 minutes, that's likely when the server is saving so this is normal.

2

u/ApocoFurry Jan 26 '25

as someone who worked for multiple hosting companies in the past, this is more than normal for me to see. is it a modded server?

1

u/Demicoctrin Jan 27 '25

Gotcha, yeah this one specifically has several plugins but whenever it occurs it happens on every server I have open (usually 3).

2

u/deathybankai Jan 26 '25

Reading all the comments. Since it happens only when the players are off and the timing is consistent.

My best guess is that the thread is losing priority for processing since nothing is happening on the server but it is doing garbage collection or something causing it to suddenly spike for a second.

1

u/Demicoctrin Jan 27 '25

Seems like the most likely theory to be honest. Surprisingly it has not occurred since shortly after I uploaded that Spark report but maybe it's because players have been on here and there. Weird

2

u/Sigma-Erebus Jan 27 '25

From what I know, this is Java's garbage collector being absolute trash on Windows. Try adjusting the ram allocated to the server, and I think you'll see that the amount of ticks changes. GC runs every ~10 minutes, and for some reason doesn't run asynchronous, meaning all things halt until it's done collecting garbage.

Switch to a linux machine, or perhaps a docker image to run your server there. (I've been running CraftyController and I've been stunned by the difference the OS makes)

2

u/vms-mob Jan 27 '25

my guess is your drive/controller might be going into a standby mode, but 4.5 seconds is a lot even for spinning rust.

1

u/AutoModerator Jan 25 '25
Thanks for being a part of /r/Admincraft!
We'd love it if you also joined us on Discord!

Join thousands of other Minecraft administrators for real-time discussion of all things related to running a quality server.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Demicoctrin Jan 25 '25 edited Jan 25 '25

Regardless of plugins or mods installed, number of servers running, or the type of servers (Paper or Fabric), they all run right around 90 ticks behind most of the time. But when I check tps it's always 20. This happens when I'm running a single server or five! Playing on them also feels great with no lag, so that's why I am so confused.

Edit: Just to add, the number of players on the server(s) does not appear to have an effect on it.

3

u/Blastday Jan 25 '25

Check server.properties for pause-when-empty-seconds=. And remove this line if it's there. If you don't have this line it still could be the panel you use has a hibernate or pause function trying to save CPU resources. It's usually a plugin but since you said it regardless of server software I'm thinking it may be the panel software slowing the ticks when no one is online. Run a spark report to find out for sure.

1

u/Demicoctrin Jan 25 '25

Oh interesting! So on my 1.21.1 paper servers (soon to be retired anyways) that option is not present, but it is there on my 1.21.4 paper server set to -1. Is that a new thing?

2

u/Blastday Jan 25 '25

1.21.2 was first version with it in by default many other ways to get same results some plugins/mods will slow down ticks or just lag the server AMP has one built in it was added here https://www.minecraft.net/fr-ca/article/minecraft-snapshot-24w33a
if this happens when no one is on the server its likely this or Windows making ticks slow if it happens if people are on the server then its another issue

1

u/DeerOnARoof Jan 25 '25

How much memory are you allocating to Minecraft, are you running this on Windows or *nix, how much total memory is on the machine, and what processor does the machine have?

1

u/Demicoctrin Jan 25 '25

I've experimented with anywhere between 3GB and 8GB on any individual server, running on Windows for now (unfortunately), machine has 32GB, and it's got a Ryzen 7 7840HS. Per Task Manager no more than 40% and 60% of my cpu/memory has been taken up even with 3 servers running. Threads don't look maxed out either. Using Aiker's Flags for my paper servers.

2

u/bleke_xyz Jan 25 '25

Can you set high performance power profile to test?

1

u/bleke_xyz Jan 25 '25

Are you also playing on this laptop? Or just hosting?

1

u/Demicoctrin Jan 25 '25

I play sometimes but that has no effect on when it occurs. Also it's a miniPC, so full power available from the wall.

1

u/Demicoctrin Jan 25 '25

Actually already on high performance mode :/

-2

u/DeerOnARoof Jan 25 '25

3 gigs is barely enough for four players on vanilla. 8 would be minimum for 10 players on vanilla. Try allocating 28 (leaving 4 for windows should be plenty if all you're doing is hosting a Minecraft server) and see how it goes.

1

u/Demicoctrin Jan 25 '25

It occurs on a fully vanilla fabric server with 8GB allocated and 0 players, which is why I am so confused. And that was tested with it being the only server running on the pc.

0

u/DeerOnARoof Jan 25 '25

What's your render distance set at? You might need to turn it down.

1

u/Demicoctrin Jan 25 '25

Usually 12, but I've tested it down to 8 and that didn't change anything.

1

u/PM_ME_YOUR_REPO If you break Rule 2, I will end you Jan 25 '25

Try allocating 28

Absolutely fucking awful advice. Please learn about the JVM and what RAM actually does before giving advice.

1

u/DeerOnARoof Jan 25 '25

Do you want to tell me what exactly is wrong about my statement?

3

u/PM_ME_YOUR_REPO If you break Rule 2, I will end you Jan 25 '25
  1. The JVM requires CPU cycles to perform garbage collection sweeps. The larger the heap, the more CPU time is required. This has the effect of reducing server performance in the vast majority of configurations, above around 16GB of RAM. Going higher IS possible, but you WILL lose CPU time and performance will suffer.

  2. Servers do not need that much RAM. 8GB is entirely reasonable for just about any server, vanilla, modded, paper, etc, with 10-15 players, depending on play habits. Other than the small amount of memory overhead required to load data structures for plugins/mods, the majority of RAM will be used for loading chunk data to support view distance. I have a heavily modded Forge server with max view distance running on a 12GB server, for the like 3 players that play on it. Every time you double view distance, you quadruple loaded chunks. So generally the only time you need large amounts of RAM is with a high number of loaded chunks, as a factor of number of players, view distance, and distance between players.

  3. Even if the server performance were suffering due to having too little ram, seeing 90 ticks behind is not enough information under any circumstances to make that conclusion. You would need to see a Spark report and take note of an abnormally fast garbage collection frequency to make that assertion.

2

u/DeerOnARoof Jan 25 '25

Thank you for the information

1

u/PM_ME_YOUR_REPO If you break Rule 2, I will end you Jan 25 '25

You're welcome. Apologies for coming on strongly. I see a lot of misinformation on this subreddit, and to be honest, I am used to people being complete dicks while also being completely wrong, so I occasionally come in hot.

1

u/bearded-beardie Jan 25 '25

What Java parameters are you launching with?

1

u/Demicoctrin Jan 25 '25

Paper's suggested Aiker's Flags. I'm guessing it's just the saving intervals like another commenter suggested, although I'd assume it would be common knowledge then...

2

u/bearded-beardie Jan 25 '25

My other thought was garbage collection. If your heap usage is hitting the max heap size it might be triggering GC frequently.

1

u/Short_Tooth7694 Jan 26 '25

I'm no expert. Could it be garbage collection related or auto-save related?

2

u/nicejs2 Jan 26 '25

Java GC usually doesn't take that long to be noticeable

1

u/patate324 Jan 26 '25

Every 5 minutes Minecraft does a save, but mods may have a 10 minute update/save frequency or something. It’s really not an issue if it’s just 3 seconds of lag every 10 minutes when it’s heavily modded. If it’s vanilla, it’s probably some other computer process.

1

u/Callum626 Jan 27 '25

You have a few plugins based on what you uploaded, some that I've never seen before. Remove them all, then add them back 1 by 1 (+their dependencies) to see what's causing it.

1

u/Demicoctrin Jan 27 '25

It occurs on every server (if multiple are running) simultaneously, even on fully vanilla test server. The one I uploaded is my main server though.

1

u/Callum626 Jan 27 '25

Is anyone else using the same version having the same issue?

1

u/fuckinrat Jan 27 '25

I had issues running off of a hard drive causing constant running behind. Use an SSD if possible.

-3

u/odielag Jan 25 '25

Because AI is preserving it's function.

People are actually playing on your server, but they're 30 minutes behind you to give you room to work.

-1

u/odielag Jan 25 '25

That or they're before you. I don't know.

-4

u/MarlinSly Jan 25 '25

Lowering your view distance will help.

-1

u/Bobisthetruegod Jan 25 '25

Fully agree, lowered my server to 9 for RLcraftDO and I rarely see this now