A
Admincraft•2mo ago
guess

Low TPS on 1.20.1 Forge server (~100 mods, 3 players). SOLVED: Valkyrien Skies memory leak

Hello, I am running a private Forge server for myself and my friends, but the server isn't performing well. Symptoms: After freshly restarting the server, the TPS sits at a healthy 20.0. But over the course of about an hour, TPS gradually drops down to 10 or even 5 TPS. From the Spark report, there doesn't seem to be any obvious offending mod causing the majority of the lag, nor are there that many entities loaded to result in such low TPS. My hardware should be quite capable of hosting just 3 players (i7-12700K, Samsung 990 Pro M.2 nvme ssd, DDR5 5600MHz memory) While not visible in this Spark report, I have tried closing out of every other program to free up 10GB of RAM headroom, and also allocated an additional 2GB (6 -> 8GB) of RAM to the server, but I don't think RAM is the issue. Even with plenty of headroom, the high MSPT persists even though GC is quick and sufficiently infrequent. Additionally, TPS remains low regardless of if all players are in the same location, loading the same chunks, or if they are spread far apart and loading different chunks. So it doesn't seem to be view- or simulation-distance related (both are set to 10 chunks) I am certain there are no "lag machines". This is just a normal modded survival among friends. Installed Performance Mods: - FerriteCore - Starlight - C2ME - Mobtimizations - Chunky (Used to pre-generate world. There is no chunk generation happening during this spark profile) Spark Report: https://spark.lucko.me/JSj5zA06fk Appreciate any help! A second pair of eyes on this report would be wonderful.
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Solution:
Thanks for the response! These are good insights. However, I believe I found the true culprit after disabling mods one by one. Seems that Valkyrien Skies: Clockwork has a memory leak. Would explain why TPS starts at 20.0 after restart and slowly dips over the course of an hour. After removing Valkyrien Skies and Clockwork, server is maintaining 20.0 TPS for hours on end without changing anything else 👌
Jump to solution
12 Replies
Snow Kit
Snow Kit•2mo ago
instead of running a server and client on the same machine, consider moving the world to the client and using the "open to lan feature". This can be port forwarded like a normal server and you can just specify port 25565 in the dialog box. While always running the client may not be ideal, it'll lower overall CPU usage and overall RAM usage on the machine. your overall CPU usage is at 60%, which is very high for a CPU with 8P/4E cores. You're getting 6.27TPS at 82mspt. This means that 50% of the time, the server isn't even ticking the world due to high CPU overhead.
Solution
guess
guess•2mo ago
Thanks for the response! These are good insights. However, I believe I found the true culprit after disabling mods one by one. Seems that Valkyrien Skies: Clockwork has a memory leak. Would explain why TPS starts at 20.0 after restart and slowly dips over the course of an hour. After removing Valkyrien Skies and Clockwork, server is maintaining 20.0 TPS for hours on end without changing anything else 👌
guess
guessOP•2mo ago
That's pretty clever though to port forward from a client, if you're going to be running a client anyway
Snow Kit
Snow Kit•2mo ago
Yeah, I’ve also seen complaints about valkyrien skies in the past
guess
guessOP•2mo ago
Yeah there's not too much information on it out there in regards to server performance, but from the bits and pieces I could find, people corroborated the memory leak hypothesis
Snow Kit
Snow Kit•2mo ago
yeah, overall it’ll save a lot of your system memory it may also be worth eventually buying a second 32gb kit and slapping that in your machine
guess
guessOP•2mo ago
Yeah perhaps 🤔 I was looking into it but I also don't know if the IMC on my 12th gen intel chip could handle the 5600MHz speed on 4 sticks. So some speed would be lost (and outside of minecraft I do things that are memory-bandwidth bottlenecked, so memory speed is important). But anyway, after removing Valkyrien Skies, client and server memory aren't climbing out of control. I've got a healthy memory headroom now 👌
Snow Kit
Snow Kit•2mo ago
allegedly people do say the i7-12700k should still be able to hit 6000mhz on ddr5 ram with all 4 dimms
guess
guessOP•2mo ago
Oh nice! Alrighty allegedly yeh
Snow Kit
Snow Kit•2mo ago
if you don’t have dual rank memory, you will get a bandwidth improvement from having 4 sticks as well
guess
guessOP•2mo ago
yee mine's dual rank
Snow Kit
Snow Kit•2mo ago
ah, then it would be the same

Did you find this page helpful?