Minecraft - Lightly modded Java server has lag spikes on powerful hardware (i9-12950HX)

System Information

Field Value
Operating System Linux - Ubuntu 24.04.3 on x86_64
Product AMP ‘Phobos’ v2.6.5.0 (Mainline)
Virtualization None
Application Minecraft
Module MinecraftModule
Running in Container No
Current State Ready

Task

Run a Minecraft server reliably

Problem Description

Issue

When running a Minecraft server, I have frequent and very noticeable lag spikes that cause all players to move back in time by roughly a second. I was previously on an N100-powered server, so I figured this was just the low tier hardware, but I just migrated to an i9-12950HX powered mini PC and the problem is still there.

This issue often does not correlate with tickmonitor output through spark. Sometimes, I will see 2+ second ticks pop up, but they oddly don’t seem to be at the same time as the rubberbanding.

What I’ve tried:

  • Reducing render distance
  • Uninstalling mods
  • Fresh server installs
  • Massively improving hardware
  • Disabling C-states in the BIOS
  • Increasing power limits in the BIOS
  • Using safepoint logs to determine if the JVM is the cause (nothing notable, at least to me)
  • Playing while running a chunky pregen task - this did not seem to make things worse
  • Spark reports 91% time in Unsafe.park() / LockSupport.parkNanos(), which is normal idle behavior as far as I can tell

I initially thought this was a world generation issue, especially since I am using Terralith (not sure how much load this would cause). However, it seems like the issues are not exclusive to when players are traveling, as I can be standing in a single spot and have a drop happen (which I can tell by seeing entities stop moving, then move very rapidly to a new spot).

I have not been able to capture this problem with Spark yet. I will update the ticket if I do.

I am wondering if this is an OS-level issue since Ubuntu Server and AMP are really the only things that are the same between setups. I can’t find any record of others having issues this pervasive, and it’s really frustrating for me and my players, so I thought you all might have some experience, even if it seems unlikely to be directly related to AMP!

Edit: I am seeing errors in the console sometimes – unclear yet if they’re exactly when I have this issue. They’re truncated, but here’s what I see in AMP.

at knot//io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:827)
	at knot//io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:752)
	at knot//io.netty.channel.ChannelOutboundHandlerAdapter.write(ChannelOutboundHandlerAdapter.java:113)
	at knot//net.minecraft.class_2535$2.write(class_2535.java:488)
	at knot//io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:827)
	at knot//io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:804)
	at knot//io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:869)
	at knot//io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1046)
	at knot//io.netty.channel.Channel.writeAndFlush(Channel.java:257)
	at knot//net.minecraft.class_2535.method_36942(class_2535.java:324)
	at knot//net.minecraft.class_2535.method_10764(class_2535.java:316)
	at knot//net.minecraft.class_2535.method_52906(class_2535.java:298)
	at knot//net.minecraft.class_2535.method_10752(class_2535.java:292)
	at knot//net.minecraft.class_2535.exceptionCaught(class_2535.java:143)
	at knot//io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:289)
	at knot//io.netty.channel.AbstractChannelHandlerContext.fireExceptionCaught(AbstractChannelHandlerContext.java:271)
	at knot//io.netty.channel.DefaultChannelPipeline$HeadContext.exceptionCaught(DefaultChannelPipeline.java:1396)
	at knot//io.netty.channel.DefaultChannelPipeline.fireExceptionCaught(DefaultChannelPipeline.java:890)
	at knot//io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.handleReadException(AbstractEpollStreamChannel.java:725)
	at knot//io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:820)
	at knot//io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.handle(AbstractEpollChannel.java:482)
	at knot//io.netty.channel.epoll.EpollIoHandler$DefaultEpollIoRegistration.handle(EpollIoHandler.java:317)
	at knot//io.netty.channel.epoll.EpollIoHandler.processReady(EpollIoHandler.java:515)
	at knot//io.netty.channel.epoll.EpollIoHandler.run(EpollIoHandler.java:460)
	at knot//io.netty.channel.SingleThreadIoEventLoop.runIo(SingleThreadIoEventLoop.java:225)
	at knot//io.netty.channel.SingleThreadIoEventLoop.run(SingleThreadIoEventLoop.java:196)
	at knot//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:1193)
	at knot//io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at java.base/java.lang.Thread.run(Thread.java:1583)


Reproduction Steps

  • Start server
  • Play on the server
  • Note lag spikes, “[player] moved too quickly!” logs, etc. often without Spark tickmonitor logs

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.