About this question
I'm looking to run a modded minecraft server (1.12.2) for myself and a friend to play on. There are quite a few mods we're looking to use, and I'd like to know what I can do to make the server run more smoothly. As of right now, it lags quite a lot, even with a freshly-generated world. Looking around online, all the information I can find feels like it's at least a little bit outdated, and sometimes a lot outdated. So while this is looking to get a particular server up and running, I'd also appreciate anything about generally optimizing performance using current versions of java.
According to LagGoggles, the main culprits seem to be mobs, with one or two (which one changes each time I run it) taking ~20-30 ms per tick each time I run the profiler.
According to warm roast, something is making the game spend a significant amount of time doing pathfinding for sheep, and a significant amount of time is spent in Update Time Light And Entities, about 80% of the server thread's resources.
Is there a mod that optimizes entity calculations? Or perhaps a way to determine which mods are most adversely affecting performance, so I know which ones to focus on removing or fiddling with configs?
The server is running on a computer with a Ryzen 2200G (probably soon to be upgraded to a 3600, though--hopefully that helps) and 16 GB of DDR4-2666 RAM. It also has a GTX 1060-6GB but I'm reasonably certain the graphics card doesn't matter for this. (would be nice if I could offload some computing load onto it, though.... Is there a way to do that?)
I'm using OpenJDK 8, with the OpenJ9 JVM, starting the server with the command "C:Program FilesAdoptOpenJDKjdk-8.0.242.08-openj9binjava.exe" -server -XX:+UseG1GC -Xmx8G -Xms8G -Dsun.rmi.dgc.server.gcInterval=2147483646 -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M -jar forge-1.12.2-14.23.5.2847-universal.jar. I don't actually know what most of these flags do, but I was told they would help. And I think they did, at least a little, but there's still a lot of lag.